Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- swap.OnServerEvent:connect(function(player,eq)
- if swapping ~= true then
- if w1 == nil then repeat wait() until w1 ~= nil end
- animating = true
- swapping = true
- for i=0,1,0.1 do
- w1.C1 = w1.C1:lerp(CFrame.new(0,0.5,0)*CFrame.Angles(math.rad(75),0,0),i)
- w2.C1 = w2.C1:lerp(CFrame.new(0,0.5,0)*CFrame.Angles(math.rad(75),0,0),i)
- game:GetService("RunService").RenderStepped:wait()
- end
- og.Parent = game.Workspace
- g.Parent = nil
- g = og
- game:GetService("RunService").RenderStepped:wait()
- if eq == 1 then
- pgun = snam
- gw.Part1 = nil
- gw:Destroy()
- g.Parent = nil
- g = sg
- gw = Instance.new("Weld",g)
- gw.Name = "Gun"
- gw.Part0 = g.Handle
- gw.Part1 = servArms["RA"]
- w1.C0 = guns[snam].DefArmPos.Left
- w2.C0 = guns[snam].DefArmPos.Right
- gw.C0 = guns[snam].DefGunPos*CFrame.Angles(guns[snam].RotFix.X,guns[snam].RotFix.Y,guns[snam].RotFix.Z)
- g.Parent = player.Character
- else pgun = pnam
- gw.Part1 = nil
- gw:Destroy()
- g.Parent = nil
- g = pg
- gw = Instance.new("Weld",g)
- gw.Name = "Gun"
- gw.Part0 = g.Handle
- gw.Part1 = servArms["RA"]
- w1.C0 = guns[pnam].DefArmPos.Left
- w2.C0 = guns[pnam].DefArmPos.Right
- gw.C0 = guns[pnam].DefGunPos*CFrame.Angles(guns[pnam].RotFix.X,guns[pnam].RotFix.Y,guns[pnam].RotFix.Z)
- g.Parent = player.Character
- end
- game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = guns[pgun].Speed
- for i=0,1,0.1 do
- w1.C1 = w1.C1:lerp(CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),0,0),i)
- w2.C1 = w2.C1:lerp(CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),0,0),i)
- game:GetService("RunService").RenderStepped:wait()
- end
- animating = false
- swapping = false
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment