A Gunpwn
A Gunpwn
Name = "xSoulStealerx"
me = Plrs[Name]
char = me.Character
Modelname = "Gun"
necko = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
selected = false
Hurt = false
Able = true
Add = {
Sphere = function(P)
local m = Instance.new("SpecialMesh",P)
m.MeshType = "Sphere"
return m
end,
BF = function(P)
local bf = Instance.new("BodyForce",P)
bf.force = Vector3.new(0, P:GetMass()*187, 0)
return bf
end,
BP = function(P)
local bp = Instance.new("BodyPosition",P)
bp.maxForce = Vector3.new(math.huge, 0, math.huge)
bp.P = 14000
return bp
end,
BG = function(P)
local bg = Instance.new("BodyGyro",P)
bg.maxTorque = Vector3.new(math.huge, math.huge, math.huge)
bg.P = 14000
return bg
end,
Mesh = function(P, ID, x, y, z)
local m = Instance.new("SpecialMesh")
m.MeshId = ID
m.Scale = Vector3.new(x, y, z)
m.Parent = P
return m
end,
Sound = function(P, ID, vol, pitch)
local s = Instance.new("Sound")
s.SoundId = ID
s.Volume = vol
s.Pitch = pitch
s.Parent = P
return s
end
}
function getAllParts(from)
local t = {}
function getParts(where)
for i, v in pairs(where:children()) do
if v:IsA("BasePart") then
if v.Parent ~= char and v.Parent.Parent ~= char then
table.insert(t, v)
end
end
getParts(v)
end
end
getParts(workspace)
return t
end
function getHumanoid(c)
local h = nil
for i,v in pairs(c:children()) do
if v:IsA("Humanoid") and c ~= char then
if v.Health > 0 then
h = v
end
end
end
return h
end
torso = char.Torso
neck = torso.Neck
hum = char.Humanoid
Rarm = char["Right Arm"]
Larm = char["Left Arm"]
Rleg = char["Right Leg"]
Lleg = char["Left Leg"]
hc = Instance.new("Humanoid")
hc.Health = 0
hc.MaxHealth = 0
function PlaySound(sound)
local s = sound:clone()
s.Parent = torso
s.PlayOnRemove = true
coroutine.resume(coroutine.create(function()
wait()
s:remove()
end))
end
Mo = Instance.new("Model")
Mo.Name = Modelname
pipe = Part(Mo, false, false, 0, 0, "Dark grey", 0.4, 0.4, 1.6, true)
Weld(handle, pipe, 0.55, -0.55, 1.8, math.rad(-5), 0, math.rad(45))
main = Part(Mo, false, false, 1, 0, "Dark grey", 0.1, 0.1, 0.1, true)
Weld(pipe, main, 0, 0, -1.1, 0, 0, 0)
block = Part(Mo, false, false, 0, 0, "Dark grey", 0.45, 0.8, 0.65, true)
Weld(handle, block, 0, -0.76, 0, 0, 0, 0)
Instance.new("BlockMesh",block)
for i = 0, 360, 60 do
local p = Part(Mo, false, false, 0, 0, "Medium grey", 0.2, 0.6, 0.2, true)
local w = Weld(main, p, 0, 0, 0, 0, 0, 0)
w.C0 = CFrame.Angles(0, 0, math.rad(i))
w.C1 = CFrame.new(-0.2, 0, 0) * CFrame.Angles(math.pi/2, 0, 0)
Instance.new("CylinderMesh",p)
end
Mo.Parent = char
TH.Part1 = handle
bin = script.Parent
function detach(bool)
LLW.C0 = CFrame.new(0, 0, 0)
RLW.C0 = CFrame.new(0, 0, 0)
LAW.C0 = CFrame.new(0, 0, 0)
RAW.C0 = CFrame.new(0, 0, 0)
if bool then
LLW.Part1 = nil
RLW.Part1 = nil
RAW.Part1 = nil
LAW.Part1 = nil
end
end
function attach()
RAW.Part1 = Rarm
LAW.Part1 = Larm
RLW.Part1 = Rleg
LLW.Part1 = Lleg
end
function normal()
neck.C0 = necko
RAW.C0 = RAWStand
LAW.C0 = LAWStand
RLW.C0 = RLWStand
LLW.C0 = LLWStand
HW.C0 = HWStand
end
function selectanim()
TH.Part1 = nil
HW.Part1 = handle
end
function deselanim()
TH.Part1 = handle
HW.Part1 = nil
detach(true)
end
function select(mouse)
selectanim()
selected = true
mouse.Button1Down:connect(function()
end)
mouse.KeyDown:connect(function(key)
key = key:lower()
if key == "q" then
end
end)
end
function deselect(mouse)
selected = false
deselanim()
end
bin.Selected:connect(select)
bin.Deselected:connect(deselect)