Guest User

Untitled

a guest
Aug 7th, 2015
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. swap.OnServerEvent:connect(function(player,eq)
  2.  
  3. if swapping ~= true then
  4. if w1 == nil then repeat wait() until w1 ~= nil end
  5. animating = true
  6. swapping = true
  7.  
  8. for i=0,1,0.1 do
  9. w1.C1 = w1.C1:lerp(CFrame.new(0,0.5,0)*CFrame.Angles(math.rad(75),0,0),i)
  10. w2.C1 = w2.C1:lerp(CFrame.new(0,0.5,0)*CFrame.Angles(math.rad(75),0,0),i)
  11. game:GetService("RunService").RenderStepped:wait()
  12. end
  13.  
  14. og.Parent = game.Workspace
  15. g.Parent = nil
  16. g = og
  17. game:GetService("RunService").RenderStepped:wait()
  18. if eq == 1 then
  19. pgun = snam
  20.  
  21. gw.Part1 = nil
  22. gw:Destroy()
  23. g.Parent = nil
  24.  
  25. g = sg
  26. gw = Instance.new("Weld",g)
  27. gw.Name = "Gun"
  28.  
  29. gw.Part0 = g.Handle
  30. gw.Part1 = servArms["RA"]
  31.  
  32. w1.C0 = guns[snam].DefArmPos.Left
  33. w2.C0 = guns[snam].DefArmPos.Right
  34.  
  35. gw.C0 = guns[snam].DefGunPos*CFrame.Angles(guns[snam].RotFix.X,guns[snam].RotFix.Y,guns[snam].RotFix.Z)
  36.  
  37. g.Parent = player.Character
  38. else pgun = pnam
  39.  
  40. gw.Part1 = nil
  41. gw:Destroy()
  42. g.Parent = nil
  43.  
  44. g = pg
  45. gw = Instance.new("Weld",g)
  46. gw.Name = "Gun"
  47.  
  48. gw.Part0 = g.Handle
  49. gw.Part1 = servArms["RA"]
  50.  
  51. w1.C0 = guns[pnam].DefArmPos.Left
  52. w2.C0 = guns[pnam].DefArmPos.Right
  53.  
  54. gw.C0 = guns[pnam].DefGunPos*CFrame.Angles(guns[pnam].RotFix.X,guns[pnam].RotFix.Y,guns[pnam].RotFix.Z)
  55.  
  56. g.Parent = player.Character
  57. end
  58. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = guns[pgun].Speed
  59. for i=0,1,0.1 do
  60. w1.C1 = w1.C1:lerp(CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),0,0),i)
  61. w2.C1 = w2.C1:lerp(CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),0,0),i)
  62. game:GetService("RunService").RenderStepped:wait()
  63. end
  64. animating = false
  65. swapping = false
  66. end
  67.  
  68. end)
Advertisement
Add Comment
Please, Sign In to add comment