Advertisement
Guest User

Roblox wizard staff script by aleksa12432

a guest
Oct 29th, 2014
6,096
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 19.77 KB | None | 0 0
  1. --[[
  2. Wizard staff, by aleksa12432, published by him.
  3. Local script, just run, don't change anything (except if you know what you are doing)
  4. You can use this whenever you want, edit it, but please put my credit
  5. ]]--
  6. LocalPlayer = game.Players.LocalPlayer
  7. Activated = false
  8. Equipped = false
  9. Regening = false
  10. FireBall = false
  11. Spikes = false
  12. ForceField = false
  13. shooting = false
  14. Mode = "Shoot"
  15. Energy = 100
  16. mouse = LocalPlayer:GetMouse()
  17. t = Instance.new("Tool",LocalPlayer.Backpack)
  18. t.Name = 'Wizard staff'
  19. t.GripPos = Vector3.new(0,-2,0)
  20. p = Instance.new("Part",t)
  21. p.FormFactor = 'Custom'
  22. p.Name = 'Handle'
  23. p.CanCollide = false
  24. m = Instance.new("SpecialMesh",p)
  25. m.MeshId = 'http://www.roblox.com/asset/?id=18434043'
  26. m.TextureId = 'http://www.roblox.com/asset/?id=26017177'
  27. char = LocalPlayer.Character
  28. mouse = LocalPlayer:GetMouse()
  29. humanoid = char:findFirstChild("Humanoid")
  30. torso = char:findFirstChild("Torso")
  31. head = char.Head
  32. ra = char:findFirstChild("Right Arm")
  33. la = char:findFirstChild("Left Arm")
  34. rl = char:findFirstChild("Right Leg")
  35. ll = char:findFirstChild("Left Leg")
  36. rs = torso:findFirstChild("Right Shoulder")
  37. ls = torso:findFirstChild("Left Shoulder")
  38. rh = torso:findFirstChild("Right Hip")
  39. lh = torso:findFirstChild("Left Hip")
  40. neck = torso:findFirstChild("Neck")
  41. rj = char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
  42. anim = char:findFirstChild("Animate")
  43. rootpart = char:findFirstChild("HumanoidRootPart")
  44. camera = workspace.CurrentCamera
  45. if anim then
  46.     anim:Destroy()
  47. end
  48. rm = Instance.new("Motor", torso)
  49. rm.C0 = CFrame.new(1.5, 0.5, 0) *CFrame.Angles(0, 0, 0)
  50. rm.C1 = CFrame.new(0, 0.5, 0)
  51. rm.Part0 = torso
  52. rm.Part1 = ra
  53. lm = Instance.new("Motor", torso)
  54. lm.C0 = CFrame.new(-1.5, 0.5, 0) *CFrame.Angles(0, 0, 0)
  55. lm.C1 = CFrame.new(0, 0.5, 0)
  56. lm.Part0 = torso
  57. lm.Part1 = la
  58. rlegm = Instance.new("Motor", torso)
  59. rlegm.C0 = CFrame.new(0.5, -1, 0) *CFrame.Angles(0, 0, 0)
  60. rlegm.C1 = CFrame.new(0, 1, 0)
  61. rlegm.Part0 = torso
  62. rlegm.Part1 = rl
  63. llegm = Instance.new("Motor", torso)
  64. llegm.C0 = CFrame.new(-0.5, -1, 0) *CFrame.Angles(0, 0, 0)
  65. llegm.C1 = CFrame.new(0, 1, 0)
  66. llegm.Part0 = torso
  67. llegm.Part1 = ll
  68. rsc0 = rm.C0
  69. lsc0 = lm.C0
  70. llc0 = llegm.C0
  71. rlc0 = rlegm.C0
  72. neckc0 = neck.C0
  73. rootc0 = rj.C0
  74. PLAYERGUI = LocalPlayer.PlayerGui
  75. GUI = Instance.new("ScreenGui",PLAYERGUI)
  76. FRAME = Instance.new("Frame",GUI)
  77. FRAME.Size = UDim2.new(0.5,0,0.05,0)
  78. FRAME.BackgroundColor3 = BrickColor.new("Bright blue").Color
  79. FRAME.BorderSizePixel = 0
  80. TEXTLABEL = Instance.new("TextLabel",FRAME)
  81. TEXTLABEL.Size = UDim2.new(1,0,1,0)
  82. TEXTLABEL.BackgroundTransparency = 1
  83. TEXTLABEL.Text = "Mana: "..tostring(Energy)
  84. TEXTLABEL.BorderSizePixel = 0
  85. TEXTLABEL.Font = 'Legacy'
  86. TEXTLABEL.FontSize = 'Size24'
  87. FRAME2 = Instance.new("Frame",GUI)
  88. FRAME2.Size = UDim2.new(0.5,0,0.05,0)
  89. FRAME2.BackgroundColor3 = BrickColor.new("Bright red").Color
  90. FRAME2.BorderSizePixel = 0
  91. FRAME2.Position = UDim2.new(0.5,0,0,0)
  92. TEXTLABEL2 = Instance.new("TextLabel",FRAME2)
  93. TEXTLABEL2.Size = UDim2.new(1,0,1,0)
  94. TEXTLABEL2.BackgroundTransparency = 1
  95. TEXTLABEL2.Text = "Health: "..tostring(humanoid.Health)
  96. TEXTLABEL2.BorderSizePixel = 0
  97. TEXTLABEL2.Font = 'Legacy'
  98. TEXTLABEL2.FontSize = 'Size24'
  99. FRAME3 = Instance.new("Frame",GUI)
  100. FRAME3.Size = UDim2.new(0.5,0,0.05,0)
  101. FRAME3.BackgroundColor3 = BrickColor.new("Lime green").Color
  102. FRAME3.BorderSizePixel = 0
  103. FRAME3.Position = UDim2.new(0.5,0,0.05,0)
  104. TEXTLABEL3 = Instance.new("TextLabel",FRAME3)
  105. TEXTLABEL3.Size = UDim2.new(1,0,1,0)
  106. TEXTLABEL3.BackgroundTransparency = 1
  107. TEXTLABEL3.Text = "Spell: Star shoot"
  108. TEXTLABEL3.BorderSizePixel = 0
  109. TEXTLABEL3.Font = 'Legacy'
  110. TEXTLABEL3.FontSize = 'Size24'
  111. TEXTLABEL3.TextScaled = true
  112. function __getVelocity(p1,p2,speed)
  113.     local dis=(p1-p2).magnitude
  114.     if speed=="dis" then
  115.         if dis*6>100 then
  116.             speed=dis*6
  117.         else
  118.             speed=100
  119.         end
  120.     end
  121.     local x=(p1.x-p2.x)/dis*speed
  122.     local y=(p1.y-p2.y)/dis*speed
  123.     local z=(p1.z-p2.z)/dis*speed
  124.     return Vector3.new(-x,-y+10,-z)
  125. end
  126. function __onActivated()
  127.     Activated = true
  128. end
  129. function __onDeactivated()
  130.     Activated = false
  131. end
  132. function __onEquipped(mouse)
  133.     Equipped = true
  134.     pcall(function()
  135.         local a = Instance.new("Explosion",LocalPlayer.Character)
  136.         a.Position = LocalPlayer.Character['Right Arm'].Position
  137.         a.BlastPressure = 0
  138.         a.BlastRadius = 20
  139.     end)
  140.     local b = Instance.new("Fire",p)
  141.     b.Size = 1
  142.     b.Color = Color3.new(0, 255, 255)
  143.     b.SecondaryColor = Color3.new(255, 255, 0)
  144.     local w = Instance.new("Motor",char['Right Arm'])
  145.     w.Name = 'Wizard staff weld'
  146.     w.Part0 = char['Right Arm']
  147.     w.Part1 = p
  148.     w.C1 = CFrame.new(0,-1.5,0.5) * CFrame.Angles(math.rad(90),0,0)
  149. end
  150. function __onUnequipped(mouse)
  151.     Equipped = false
  152.     pcall(function()
  153.         p.Fire:Destroy()
  154.     end)
  155.     pcall(function()
  156.         char['Right Arm']['Wizard staff weld']:Destroy()
  157.     end)
  158. end
  159. function __Shoot()
  160.     if Regening == true then return end
  161.     if Energy < 5 then return end
  162.     shooting = true
  163.     Energy = Energy - 5
  164.     humanoid.WalkSpeed = 0
  165.     local speed = math.random(400,500)
  166.     local bullet = Instance.new("Part",workspace)
  167.     bullet.Name = 'Bullet'
  168.     bullet.TopSurface = 0
  169.     bullet.BottomSurface = 0
  170.     bullet.FormFactor = 'Custom'
  171.     bullet.CFrame = p.CFrame
  172.     bullet.CanCollide = false
  173.     bullet.Velocity = __getVelocity(bullet.Position, mouse.Hit.p, speed)
  174.     local bulletmesh = Instance.new("SpecialMesh",bullet)
  175.     bulletmesh.MeshId = 'http://www.roblox.com/asset/?id=24388358'
  176.     bulletmesh.TextureId = 'http://www.roblox.com/asset/?id=24388341'
  177.     bulletmesh.VertexColor = Vector3.new(0,0,0)
  178.     bullet.Touched:connect(function(toucher)
  179.         if toucher.Parent:findFirstChild'Head' and toucher.Parent:findFirstChild'Torso' and toucher.Parent.Name ~= LocalPlayer.Name then
  180.             for i,v in pairs(toucher.Parent:children()) do
  181.                 if v.ClassName == 'Humanoid' then
  182.                     if v.Health > 100 then
  183.                         v.Health = 100
  184.                     else
  185.                         v.Health = v.Health - speed/50
  186.                     end
  187.                 end
  188.             end
  189.             bullet:Destroy()
  190.         end
  191.     end)
  192.     wait(1)
  193.     shooting = false
  194.     humanoid.WalkSpeed = 16
  195. end
  196. function __FireBall()
  197.     if Regening == true then return end
  198.     if Energy < 50 then return end
  199.     if FireBall == true then return end
  200.     if ForceField == true then return end
  201.     Energy = Energy - 50
  202.     local a = Instance.new("Part",workspace)
  203.     a.Anchored = true
  204.     a.CFrame = LocalPlayer.Character.Torso.CFrame * CFrame.new(0,0,-5)
  205.     a.FormFactor = 'Custom'
  206.     a.Size = Vector3.new(5,5,5)
  207.     Instance.new("SpecialMesh", a).MeshType = 'Sphere'
  208.     local b = Instance.new('Decal',a)
  209.     b.Texture = 'http://www.roblox.com/asset/?id=58278973'
  210.     b.Face = 'Right'
  211.     local c = Instance.new('Decal',a)
  212.     c.Texture = 'http://www.roblox.com/asset/?id=58278973'
  213.     c.Face = 'Left'
  214.     local d = Instance.new('Decal',a)
  215.     d.Texture = 'http://www.roblox.com/asset/?id=58278973'
  216.     d.Face = 'Top'
  217.     local e = Instance.new('Decal',a)
  218.     e.Texture = 'http://www.roblox.com/asset/?id=58278973'
  219.     e.Face = 'Front'
  220.     local f = Instance.new('Decal',a)
  221.     f.Texture = 'http://www.roblox.com/asset/?id=58278973'
  222.     f.Face = 'Back'
  223.     local g = Instance.new('Decal',a)
  224.     g.Texture = 'http://www.roblox.com/asset/?id=58278973'
  225.     g.Face = 'Bottom'
  226.     local x = Instance.new('Fire',a)
  227.     x.Size = 20
  228.     local con = a.Touched:connect(function(what)
  229.         if what.Parent.Name ~= LocalPlayer.Name then
  230.             if what.Parent:findFirstChild'Torso' and what.Parent:findFirstChild'Head' then
  231.                 what:Destroy()
  232.             end
  233.         end
  234.     end)
  235.     coroutine.wrap(function()
  236.         FireBall = true
  237.         humanoid.WalkSpeed = 0
  238.         for i = 0,1,0.05 do
  239.             a.Mesh.Scale = Vector3.new(i,i,i)
  240.             wait()
  241.         end
  242.         FireBall = false
  243.         humanoid.WalkSpeed = 16
  244.         while wait() do
  245.             if a == nil or a.Parent ~= workspace then break end
  246.             a.CFrame = a.CFrame * CFrame.new(0,0,-1)
  247.         end
  248.         con:disconnect()
  249.     end)()
  250.     coroutine.wrap(function()
  251.         wait(5)
  252.         Instance.new("Explosion",workspace).Position = a.Position
  253.         a:Destroy()
  254.     end)()
  255. end
  256. function __Spikes()
  257.     if Regening == true then return end
  258.     if Energy < 25 then return end
  259.     if Spikes == true then return end
  260.     if ForceField == true then return end  
  261.     Energy = Energy - 25
  262.     Spikes = true
  263.     humanoid.WalkSpeed = 0
  264.     for z = 0,6 do
  265.         local a = Instance.new("Part",workspace)
  266.         a.FormFactor = 'Custom'
  267.         a.Size = Vector3.new(2.4, 3.4, 2.4)
  268.         a.Anchored = true
  269.         local b = Instance.new("SpecialMesh",a)
  270.         b.MeshId = 'http://www.roblox.com/asset/?id=1033714'
  271.         b.TextureId = 'http://www.roblox.com/asset?id=39251676'
  272.         b.VertexColor = Vector3.new(1, 1, 1)
  273.         b.Scale = Vector3.new(1.2, 5.4, 1.2)
  274.         a.CFrame = LocalPlayer.Character.Torso.CFrame * CFrame.new(0,-0.5,-(z*4)-2)
  275.         local con = a.Touched:connect(function(what)
  276.             if what.Parent.Name ~= LocalPlayer.Name then
  277.                 if what.Parent:findFirstChild'Torso' and what.Parent:findFirstChild'Head' then
  278.                     for i,v in pairs(what.Parent:children()) do
  279.                         if v.ClassName == 'Humanoid' then
  280.                             if v.Health > 100 then v.Health = 100 end
  281.                             v.Health = v.Health - 10
  282.                         end
  283.                     end
  284.                 end
  285.             end
  286.         end)
  287.         coroutine.wrap(function()
  288.             wait(3)
  289.             a:Destroy()
  290.             con:disconnect()
  291.         end)()
  292.         wait()
  293.     end
  294.     humanoid.WalkSpeed = 16
  295.     Spikes = false
  296. end
  297. function __Lightning()
  298.     if Energy < 40 then return end
  299.     if Lightning == true then return end
  300.     if Regening == true then return end
  301.     if ForceField == true then return end
  302.     humanoid.WalkSpeed = 0
  303.     Lightning = true
  304.     Energy = Energy - 40
  305.     local function segment(pos1,pos2,color)
  306.         local dis=(pos1-pos2).magnitude
  307.         local p=Instance.new("Part")
  308.         p.CanCollide=false
  309.         p.FormFactor="Custom"
  310.         p.Size=Vector3.new(.2,.2,dis)
  311.         p.Anchored=true
  312.         p.CFrame=CFrame.new(pos1,pos2)*CFrame.new(0,0,-dis/2)
  313.         p.BrickColor=color
  314.         return p
  315.     end
  316.     target = mouse.Hit
  317.     height=200
  318.     prev=(target*CFrame.new(0,300,0)).p
  319.     for i=height,30,-50 do
  320.         cur=Vector3.new(math.random(15)+target.x,i,math.random(15)+target.z)
  321.         p=segment(prev,cur,BrickColor.new("New Yeller"))
  322.         p.Parent=workspace
  323.         game:service("Debris"):AddItem(p,3)
  324.         prev=cur
  325.         wait()
  326.     end
  327.     p=segment(prev,target.p,BrickColor.new("New Yeller"))
  328.     p.Parent=workspace
  329.     game:service("Debris"):AddItem(p,3)
  330.     Instance.new("Explosion",workspace).Position=target.p
  331.     wait(1)
  332.     Lightning = false
  333.     humanoid.WalkSpeed = 16
  334. end
  335. function __ManaExplosion()
  336.     if Energy < 100 then return end
  337.     if ManaExplosion == true then return end
  338.     if Regening == true then return end
  339.     if ForceField == true then return end
  340.     humanoid.WalkSpeed = 0
  341.     ManaExplosion = true
  342.     Energy = Energy - 100
  343.     local Fire = Instance.new("Fire",LocalPlayer.Character.Torso)
  344.     for i = 0,100 do
  345.         Fire.Size = i
  346.         wait()
  347.     end
  348.     Fire:remove()
  349.     local a = Instance.new("Explosion", LocalPlayer.Character)
  350.     a.Position = LocalPlayer.Character.Torso.Position
  351.     a.BlastPressure = 1e100
  352.     a.BlastRadius = 1e100
  353.     ManaExplosion = false
  354.     humanoid.WalkSpeed = 16
  355. end
  356. function __ForceField()
  357.     if Energy < 45 then return end
  358.     if ManaExplosion == true then return end
  359.     if Regening == true then return end
  360.     if ForceField == true then return end
  361.     ForceField = true
  362.     humanoid.WalkSpeed = 0
  363.     Energy = Energy - 45
  364.     local Force_Field = Instance.new('Part',LocalPlayer.Character.Torso)
  365.     Force_Field.CFrame = LocalPlayer.Character['Left Leg'].CFrame
  366.     Force_Field.Transparency = 0.7
  367.     Force_Field.TopSurface = 0
  368.     Force_Field.BottomSurface = 0
  369.     Force_Field.Anchored = true
  370.     Force_Field.Shape = 'Ball'
  371.     Force_Field.FormFactor = 'Custom'
  372.     Force_Field.CanCollide = false
  373.     Force_Field.BrickColor = BrickColor.new('Deep blue')
  374.     local FF_Mesh = Instance.new('SpecialMesh',Force_Field)
  375.     FF_Mesh.MeshType = 'Sphere'
  376.     FF_Mesh.Scale = Vector3.new(0,0,0)
  377.     Force_Field.Touched:connect(function(what)
  378.         print(what.Name)
  379.         print(what.Parent.Name)
  380.         if what.Parent.Name ~= LocalPlayer.Name then
  381.             if what.Parent:findFirstChild'Torso' and what.Parent:findFirstChild'Head' then
  382.                 for i,v in pairs(what.Parent:children()) do
  383.                     if v.ClassName == 'Humanoid' then
  384.                         if v.Health > 100 then v.Health = 100 end
  385.                         v.Health = v.Health - 10
  386.                     end
  387.                 end
  388.             end
  389.         end
  390.     end)
  391.     for i = 0,15,0.1 do
  392.         FF_Mesh.Scale = Vector3.new(i,i,i)
  393.         wait()
  394.     end
  395.     for i = 15,0,-0.1 do
  396.         FF_Mesh.Scale = Vector3.new(i,i,i)
  397.         wait()
  398.     end
  399.     Force_Field:remove()
  400.     humanoid.WalkSpeed = 16
  401.     ForceField = false
  402. end
  403. t.Activated:connect(__onActivated)
  404. t.Deactivated:connect(__onDeactivated)
  405. t.Equipped:connect(__onEquipped)
  406. t.Unequipped:connect(__onUnequipped)
  407. coroutine.wrap(function()
  408.     while wait() do
  409.         if Activated == true then
  410.             if Mode == 'Shoot' then
  411.                 __Shoot()
  412.             elseif Mode == 'FireBall' then
  413.                 __FireBall()
  414.             elseif Mode == 'Spikes' then
  415.                 __Spikes()
  416.             elseif Mode == 'Lightning' then
  417.                 __Lightning()
  418.             elseif Mode == 'ManaExplosion' then
  419.                 __ManaExplosion()
  420.             elseif Mode == 'ForceField' then
  421.                 __ForceField()
  422.             end
  423.         end
  424.         if Regening == true then
  425.             Energy = Energy + 5
  426.             wait(1)
  427.         end
  428.     end
  429. end)()
  430. mouse.KeyDown:connect(function(key)
  431.     if key == 'r' then
  432.         humanoid.WalkSpeed = 0
  433.         Regening = true
  434.     end
  435.     if key == 'c' then
  436.         if Mode == 'Shoot' then
  437.             Mode = 'FireBall'
  438.         elseif Mode == 'FireBall' then
  439.             Mode = 'Spikes'
  440.         elseif Mode == 'Spikes' then
  441.             Mode = 'Lightning'
  442.         elseif Mode == 'Lightning' then
  443.             Mode = 'ManaExplosion'
  444.         elseif Mode == 'ManaExplosion' then
  445.             Mode = 'ForceField'
  446.         else
  447.             Mode = 'Shoot'
  448.         end
  449.     end
  450.     if key:byte() == 48 then
  451.         humanoid.WalkSpeed = 50
  452.     end
  453. end)
  454. mouse.KeyUp:connect(function(key)
  455.     if key == 'r' then
  456.         humanoid.WalkSpeed = 16
  457.         Regening = false
  458.     end
  459.     if key:byte() == 48 then
  460.         humanoid.WalkSpeed = 16
  461.     end
  462. end)
  463. count = 0
  464. countspeed = 0.70
  465. humanoid.Died:connect(function()
  466.     p.Parent = workspace
  467.     p.Position = LocalPlayer.Character['Right Arm'].Position
  468.     p.CanCollide = true
  469.     game:service'Debris':AddItem(p,5)
  470.     for i = Energy,0,-1 do
  471.         Energy = i
  472.         wait()
  473.         TEXTLABEL.Text = "Mana: "..tostring(Energy)
  474.     end
  475. end)
  476. coroutine.wrap(function()
  477.     while wait() do
  478.         if Energy > 100 then Energy = 100 end
  479.         if Energy < 0 then Energy = 0 end
  480.         TEXTLABEL.Text = "Mana: "..tostring(Energy)
  481.         TEXTLABEL2.Text = "Health: "..tostring(math.floor(humanoid.Health))
  482.         if Mode == 'Shoot' then
  483.             TEXTLABEL3.Text = 'Spell: Star shoot (5 mana)'
  484.         elseif Mode == 'FireBall' then
  485.             TEXTLABEL3.Text = 'Spell: Fire ball (50 mana)'
  486.         elseif Mode == 'Spikes' then
  487.             TEXTLABEL3.Text = 'Spell: Spikes row (25 mana)'
  488.         elseif Mode == 'Lightning' then
  489.             TEXTLABEL3.Text = 'Spell: Lightning (40 mana)'
  490.         elseif Mode == 'ManaExplosion' then
  491.             TEXTLABEL3.Text = 'Spell: Mana explosion (100 mana) *KILLS EVERYTHING*'
  492.         elseif Mode == 'ForceField' then
  493.             TEXTLABEL3.Text = 'Spell: Force Field (45 mana)'
  494.         end
  495.         count = (count % 100) + countspeed
  496.         angle = math.pi * math.sin(math.pi*2/100*count)
  497.         local mg = Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude
  498.         if Vector3.new(0, torso.Velocity.y, 0).magnitude > 2 then
  499.             countspeed = 8
  500.             if Equipped == false then
  501.                 rm.C0 = rsc0 * CFrame.Angles(math.rad(150), 0, math.rad(0))
  502.             else
  503.                 rm.C0 = rsc0 * CFrame.Angles(math.rad(90),0,0)
  504.             end
  505.             lm.C0 = lsc0 * CFrame.Angles(math.rad(150), 0, math.rad(0))
  506.             rlegm.C0 = rlc0 * CFrame.Angles(math.rad(-10) + (-angle*0.05), 0, 0)
  507.             llegm.C0 = llc0 * CFrame.Angles(math.rad(-10) + (-angle*0.05), 0, 0)
  508.             neck.C0 = neckc0 * CFrame.Angles(math.rad(-10) + (-angle*0.05),0,0)
  509.             rootpart.RootJoint.C0 = rootc0 * CFrame.Angles(0,0,0)
  510.             wait()
  511.         elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude < 2 then --stand
  512.             if shooting then
  513.                 countspeed = 8
  514.                 rj.C0 = rootc0 * CFrame.Angles(0,0,math.rad(25))
  515.                 rlegm.C0 = rlc0 * CFrame.Angles(math.rad(5), -math.rad(25), 0) --right leg
  516.                 llegm.C0 = llc0 * CFrame.Angles(-math.rad(5), -math.rad(25), -0) --left leg
  517.                 lm.C0 = lsc0 * CFrame.Angles(-math.rad(30), 0, -math.rad(25)) --left arm
  518.                 rm.C0 = rsc0 * CFrame.Angles(math.rad(90)+angle*0.050, 0, 0) --right arm
  519.             elseif Regening == true then
  520.                 if Energy == 100 then Regening = false end
  521.                 rj.C0 = rootc0 * CFrame.Angles(0,0,0)
  522.                 llegm.C0 = llc0 * CFrame.Angles(0,0,math.rad(-15))
  523.                 rlegm.C0 = rlc0 * CFrame.Angles(0,0,math.rad(15))
  524.                 lm.C0 = lsc0 * CFrame.new(0.5,0,0) * CFrame.Angles(math.rad(90),0,math.rad(20))
  525.                 rm.C0 = rsc0 * CFrame.new(-0.5,0,0) * CFrame.Angles(math.rad(90),0,math.rad(-20))
  526.                 neck.C0 = neckc0 * CFrame.Angles(math.rad(15),0,0)
  527.             elseif FireBall == true then
  528.                 rj.C0 = rootc0 * CFrame.Angles(0,0,0)
  529.                 llegm.C0 = llc0 * CFrame.Angles(0,0,math.rad(-15))
  530.                 rlegm.C0 = rlc0 * CFrame.Angles(0,0,math.rad(15))
  531.                 lm.C0 = lsc0 * CFrame.new(0.5,0,0) * CFrame.Angles(math.rad(90),0,math.rad(10))
  532.                 rm.C0 = rsc0 * CFrame.new(-0.5,0,0) * CFrame.Angles(math.rad(90),0,math.rad(-10))
  533.                 neck.C0 = neckc0 * CFrame.Angles(math.rad(15),0,0)
  534.             elseif Spikes == true then
  535.                 rj.C0 = rootc0 * CFrame.Angles(0,0,0)
  536.                 llegm.C0 = llc0 * CFrame.Angles(0,0,math.rad(-15))
  537.                 rlegm.C0 = rlc0 * CFrame.Angles(0,0,math.rad(15))
  538.                 lm.C0 = lsc0 * CFrame.new(0.5,0,0) * CFrame.Angles(math.rad(90),0,math.rad(10))
  539.                 rm.C0 = rsc0 * CFrame.new(-0.5,0,0) * CFrame.Angles(math.rad(90),0,math.rad(-10))
  540.                 neck.C0 = neckc0 * CFrame.Angles(math.rad(15),0,0)
  541.             elseif Lightning == true then
  542.                 rj.C0 = rootc0 * CFrame.Angles(0,0,0)
  543.                 llegm.C0 = llc0 * CFrame.Angles(0,0,math.rad(-15))
  544.                 rlegm.C0 = rlc0 * CFrame.Angles(0,0,math.rad(15))
  545.                 lm.C0 = lsc0 * CFrame.new(0.5,0,0) * CFrame.Angles(math.rad(120),0,math.rad(10))
  546.                 rm.C0 = rsc0 * CFrame.new(-0.5,0,0) * CFrame.Angles(math.rad(120),0,math.rad(-10))
  547.                 neck.C0 = neckc0 * CFrame.Angles(math.rad(-15),0,0)
  548.             elseif ManaExplosion == true then
  549.                 coroutine.wrap(function()
  550.                     for i = 0,360 do
  551.                         rj.C0 = rootc0 * CFrame.Angles(0,0,0)
  552.                         wait()
  553.                     end
  554.                 end)()
  555.                 llegm.C0 = llc0 * CFrame.Angles(0,0,math.rad(-15))
  556.                 rlegm.C0 = rlc0 * CFrame.Angles(0,0,math.rad(15))
  557.                 lm.C0 = lsc0 * CFrame.new(0.5,0,0) * CFrame.Angles(math.rad(120),0,math.rad(10))
  558.                 rm.C0 = rsc0 * CFrame.new(-0.5,0,0) * CFrame.Angles(math.rad(120),0,math.rad(-10))
  559.                 neck.C0 = neckc0 * CFrame.Angles(math.rad(-15),0,0)
  560.             elseif ForceField == true then
  561.                 rj.C0 = rootc0 * CFrame.Angles(0,0,0)
  562.                 llegm.C0 = llc0 * CFrame.Angles(0,0,math.rad(-15))
  563.                 rlegm.C0 = rlc0 * CFrame.Angles(0,0,math.rad(15))
  564.                 lm.C0 = lsc0 * CFrame.new(0.5,0,0) * CFrame.Angles(math.rad(120),0,math.rad(10))
  565.                 rm.C0 = rsc0 * CFrame.new(-0.5,0,0) * CFrame.Angles(math.rad(120),0,math.rad(-10))
  566.                 neck.C0 = neckc0 * CFrame.Angles(math.rad(-15),0,0)
  567.             else
  568.                 countspeed = 0.70-- this judges how fast idle animation goes
  569.                 rlegm.C0 = rlc0 * CFrame.Angles(0, 0, 0) --right leg
  570.                 llegm.C0 = llc0 * CFrame.Angles(0, 0, -0) --left leg
  571.                 lm.C0 = lsc0 * CFrame.Angles(-angle*0.050, 0, 0) --left arm
  572.                 if Equipped == false then
  573.                     rm.C0 = rsc0 * CFrame.Angles(angle*0.050, 0, 0) --right arm
  574.                 else
  575.                     rm.C0 = rsc0 * CFrame.Angles(math.rad(90),0,0)
  576.                 end
  577.                 neck.C0 = neckc0 * CFrame.Angles(-angle*0.025, 0, 0) --head
  578.                 rj.C0 = rootc0 * CFrame.Angles(-math.rad(1), 0, 0) --torso
  579.             end
  580.         elseif mg > 2 and mg < 40 then-- walk
  581.             countspeed = 8-- this judges how fast the walk animation goes
  582.             rlegm.C0 = rlc0 * CFrame.Angles(-angle*0.100, 0, 0)
  583.             llegm.C0 = llc0 * CFrame.Angles(angle*0.100, 0, 0)
  584.             neck.C0 = neckc0 * CFrame.Angles(0, 0, 0)
  585.             lm.C0 = lsc0 * CFrame.Angles(-angle*0.100, 0, 0)
  586.             if Equipped == false then
  587.                 rm.C0 = rsc0 * CFrame.Angles(angle*0.100, 0, 0)
  588.             else
  589.                 rm.C0 = rsc0 * CFrame.Angles(math.rad(90),0,0)
  590.             end
  591.             rj.C0 = rootc0 * CFrame.Angles(0, 0, 0)
  592.         elseif mg > 40 then--run
  593.             countspeed = 8
  594.             rlegm.C0 = rlc0 * CFrame.Angles(-angle*0.200, 0, 0)
  595.             llegm.C0 = llc0 * CFrame.Angles(angle*0.200, 0, 0)
  596.             neck.C0 = neckc0 * CFrame.Angles(math.rad(-40), 0, 0)
  597.             lm.C0 = lsc0 * CFrame.Angles(-math.rad(50)-(angle*0.100), 0, 0)
  598.             rm.C0 = rsc0 * CFrame.Angles(-math.rad(50)+(angle*0.100), 0, 0)
  599.             rj.C0 = rootc0 * CFrame.Angles(math.rad(40), 0, (angle*0.100))
  600.         end
  601.     end
  602. end)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement