aidanthescriptor101

magic

Jan 29th, 2016
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. plyr = game:GetService("Players").LocalPlayer
  2.  
  3.  
  4.  
  5. mod = Instance.new("Model")
  6. mod.Name = "Staff"
  7. mod.Parent = plyr.Character
  8.  
  9. picking = false
  10. putting = false
  11. out = false
  12. staffdown = false
  13. speed = false
  14. repon = false
  15.  
  16. function createPart(size,color,parent)
  17.     Part = Instance.new("Part")
  18.     Part.Size = size
  19.     Part.BrickColor = BrickColor.new(color)
  20.     Part.Parent = parent
  21.     Part.TopSurface = "Smooth"
  22.     Part.BottomSurface = "Smooth"
  23.     Part.formFactor = "Symmetric"
  24.     Part.CanCollide = false
  25.     Part.Locked = true
  26. end
  27.  
  28. function createMesh(type1,type2,scale,parent)
  29.     if type1 == "Block" then
  30.         Mesh = Instance.new("BlockMesh")
  31.         Mesh.Scale = scale
  32.         Mesh.Parent = parent
  33.     elseif type1 == "Special" then
  34.         Mesh = Instance.new("SpecialMesh")
  35.         Mesh.MeshType = type2
  36.         Mesh.Scale = scale
  37.         Mesh.Parent = parent
  38.     elseif type1 == "Cylinder" then
  39.         Mesh = Instance.new("CylinderMesh")
  40.         Mesh.Scale = scale
  41.         Mesh.Parent = parent
  42.     end
  43. end
  44.  
  45. function createWeld(part0,part1,c0)
  46.     Weld = Instance.new("Weld")
  47.     Weld.Parent = part0
  48.     Weld.Part0 = part0
  49.     Weld.Part1 = part1
  50.     Weld.C0 = c0
  51. end
  52.  
  53. createPart(Vector3.new(1,1,1),"Navy blue",mod) --Handle
  54. Handle = Part
  55. createMesh("Cylinder","Brick",Vector3.new(0.3252,1,0.3252),Part)
  56. createWeld(Part,plyr.Character.Torso,CFrame.new(0,0,-0.65)*CFrame.Angles(0,0,math.rad(25)))
  57. HandleWeld = Weld
  58. createPart(Vector3.new(1,1,1),"Dark stone grey",mod)
  59. MainStaff = Part --Staff
  60. createMesh("Cylinder","Brick",Vector3.new(0.3,4.5,0.3),Part)
  61. createWeld(Part,Handle,CFrame.new(0,0,0)*CFrame.Angles(0,0,0))
  62. MainStaffWeld = Weld --Weld of the staff
  63. createPart(Vector3.new(1,1,1),"Medium stone grey",mod)
  64. createMesh("Cylinder","Brick",Vector3.new(0.32,0.05,0.32),Part)
  65. createWeld(Part,MainStaff,CFrame.new(0,-2.25,0)*CFrame.Angles(0,0,0))
  66. createPart(Vector3.new(1,1,1),"Medium stone grey",mod)
  67. createMesh("Cylinder","Brick",Vector3.new(0.32,0.05,0.32),Part)
  68. createWeld(Part,MainStaff,CFrame.new(0,-1.75,0)*CFrame.Angles(0,0,0))
  69. createPart(Vector3.new(1,1,1),"Medium stone grey",mod)
  70. createMesh("Cylinder","Brick",Vector3.new(0.32,0.05,0.32),Part)
  71. createWeld(Part,MainStaff,CFrame.new(0,-1.25,0)*CFrame.Angles(0,0,0))
  72. createPart(Vector3.new(1,1,1),"Medium stone grey",mod)
  73. createMesh("Cylinder","Brick",Vector3.new(0.32,0.05,0.32),Part)
  74. createWeld(Part,MainStaff,CFrame.new(0,-0.75,0)*CFrame.Angles(0,0,0))
  75. createPart(Vector3.new(1,1,1),"Medium stone grey",mod)
  76. createMesh("Cylinder","Brick",Vector3.new(0.32,0.05,0.32),Part)
  77. createWeld(Part,MainStaff,CFrame.new(0,-0.25,0)*CFrame.Angles(0,0,0))
  78. createPart(Vector3.new(1,1,1),"Medium stone grey",mod)
  79. createMesh("Cylinder","Brick",Vector3.new(0.32,0.05,0.32),Part)
  80. createWeld(Part,MainStaff,CFrame.new(0,0.25,0)*CFrame.Angles(0,0,0))
  81. createPart(Vector3.new(1,1,1),"Medium stone grey",mod)
  82. createMesh("Cylinder","Brick",Vector3.new(0.32,0.05,0.32),Part)
  83. createWeld(Part,MainStaff,CFrame.new(0,0.75,0)*CFrame.Angles(0,0,0))
  84. createPart(Vector3.new(1,1,1),"Medium stone grey",mod)
  85. createMesh("Cylinder","Brick",Vector3.new(0.32,0.05,0.32),Part)
  86. createWeld(Part,MainStaff,CFrame.new(0,1.25,0)*CFrame.Angles(0,0,0))
  87. createPart(Vector3.new(1,1,1),"Medium stone grey",mod)
  88. createMesh("Cylinder","Brick",Vector3.new(0.32,0.05,0.32),Part)
  89. createWeld(Part,MainStaff,CFrame.new(0,1.75,0)*CFrame.Angles(0,0,0))
  90. createPart(Vector3.new(1,1,1),"Medium stone grey",mod)
  91. createMesh("Cylinder","Brick",Vector3.new(0.32,0.05,0.32),Part)
  92. createWeld(Part,MainStaff,CFrame.new(0,2.25,0)*CFrame.Angles(0,0,0))
  93. createPart(Vector3.new(1,1,1),"Medium stone grey",mod)
  94. createMesh("Block","Brick",Vector3.new(0.32,4.5,0.05),Part)
  95. createWeld(Part,MainStaff,CFrame.new(0,0,0)*CFrame.Angles(0,0,0))
  96. createPart(Vector3.new(1,1,1),"Medium stone grey",mod)
  97. createMesh("Block","Brick",Vector3.new(0.05,4.5,0.32),Part)
  98. createWeld(Part,MainStaff,CFrame.new(0,0,0)*CFrame.Angles(0,0,0))
  99. createPart(Vector3.new(1,1,1),"Deep blue",mod)
  100. Part.Transparency = 0.3
  101. OuterShell = Part
  102. createMesh("Special","Sphere",Vector3.new(0.7,0.7,0.7),Part)
  103. createWeld(Part,MainStaff,CFrame.new(0,-2.5,0)*CFrame.Angles(0,0,0))
  104. createPart(Vector3.new(1,1,1),"Light blue",mod)
  105. Part.Reflectance = 0.4
  106. MiniOrb = Part
  107. createMesh("Special","Sphere",Vector3.new(0.2,0.25,0.2),Part)
  108. Mesh.MeshId = "http://www.roblox.com/asset/?id=9756362"
  109. createWeld(MiniOrb,OuterShell,CFrame.new(0,0,0)*CFrame.Angles(0,0,0))
  110. createPart(Vector3.new(1,1,1),"Medium stone grey",mod)
  111. createMesh("Cylinder","Brick",Vector3.new(0.05,0.3,0.05),Part)
  112. createWeld(Part,MainStaff,CFrame.new(0,-2.3,0)*CFrame.Angles(0,0,0))
  113. createPart(Vector3.new(1,1,1),"Navy blue",mod)
  114. RightGlove = Part
  115. createMesh("Special","Brick",Vector3.new(1.01,0.5,1.01),Part)
  116. createWeld(Part,plyr.Character["Right Arm"],CFrame.new(0,0.751,0)*CFrame.Angles(0,0,0))
  117. createPart(Vector3.new(1,1,1),"Navy blue",mod)
  118. LeftGlove = Part
  119. createMesh("Special","Brick",Vector3.new(1.01,0.5,1.01),Part)
  120. createWeld(Part,plyr.Character["Left Arm"],CFrame.new(0,0.751,0)*CFrame.Angles(0,0,0))
  121. createPart(Vector3.new(1,1,1),"Navy blue",mod)
  122. RAJ = Part
  123. RAJ.Transparency = 1
  124. createMesh("Block","Brick",Vector3.new(0.2,0.2,0.2),Part)
  125. createWeld(Part,plyr.Character.Torso,CFrame.new(-1.5,-0.6,0)*CFrame.Angles(0,0,0))
  126. createWeld(plyr.Character["Right Arm"],RAJ,CFrame.new(0,0.6,0)*CFrame.Angles(0,0,0))
  127. RightArmJoint = Weld
  128. RightArmJoint.Parent = nil
  129. createPart(Vector3.new(1,1,1),"Navy blue",mod)
  130. LAJ = Part
  131. LAJ.Transparency = 1
  132. createMesh("Block","Brick",Vector3.new(0.2,0.2,0.2),Part)
  133. createWeld(Part,plyr.Character.Torso,CFrame.new(1.5,-0.6,0)*CFrame.Angles(0,0,0))
  134. createWeld(plyr.Character["Left Arm"],LAJ,CFrame.new(0,0.6,0)*CFrame.Angles(0,0,0))
  135. LeftArmJoint = Weld
  136. LeftArmJoint.Parent = nil
  137.  
  138.  
  139.  
  140. function pickUp()
  141.     picking = true
  142.     RightArmJoint.Parent = plyr.Character["Right Arm"]
  143.     for i = 1,8 do
  144.         RightArmJoint.C1 = RightArmJoint.C1*CFrame.fromEulerAnglesXYZ(math.rad(-10),0,0)
  145.         wait()
  146.     end
  147.     for i = 1,8 do
  148.         RightArmJoint.C1 = RightArmJoint.C1*CFrame.fromEulerAnglesXYZ(0,0,math.rad(-6))
  149.         wait()
  150.     end
  151.     HandleWeld.C0 = CFrame.new(0,0,-0.45)*CFrame.fromEulerAnglesXYZ(math.rad(-80),0,0)
  152.     HandleWeld.Part1 = RightGlove
  153.     for i = 1,4 do
  154.         RightArmJoint.C1 = RightArmJoint.C1*CFrame.fromEulerAnglesXYZ(math.rad(-20) ,0,math.rad(12))
  155.         wait()
  156.     end
  157.     for i = 1,16 do
  158.         RightArmJoint.C1 = RightArmJoint.C1*CFrame.fromEulerAnglesXYZ(0,math.rad(-12),0)
  159.         wait()
  160.     end
  161.     for i = 1,25 do
  162.         RightArmJoint.C1 = RightArmJoint.C1*CFrame.fromEulerAnglesXYZ(math.rad(5),0,0)
  163.         wait()
  164.     end
  165.     for i = 1,5 do
  166.         RightArmJoint.C1 = RightArmJoint.C1*CFrame.fromEulerAnglesXYZ(0,math.rad(6),0)
  167.         wait()
  168.     end
  169.     HandleWeld.C0 = CFrame.new(0,0,-0.4)*CFrame.fromEulerAnglesXYZ(math.rad(270),0,0)
  170.     picking = false
  171.     rasetj = RightArmJoint.C1
  172.     out = true
  173. end
  174.  
  175. function putUp()
  176.     putting = true
  177.     for i = 1,5 do
  178.         RightArmJoint.C1 = RightArmJoint.C1*CFrame.fromEulerAnglesXYZ(0,-math.rad(6),0)
  179.         wait()
  180.     end
  181.     for i = 1,25 do
  182.         RightArmJoint.C1 = RightArmJoint.C1*CFrame.fromEulerAnglesXYZ(-math.rad(5),0,0)
  183.         wait()
  184.     end
  185.     for i = 1,16 do
  186.         RightArmJoint.C1 = RightArmJoint.C1*CFrame.fromEulerAnglesXYZ(0,math.rad(12),0)
  187.         wait()
  188.     end
  189.     for i = 1,8 do
  190.         RightArmJoint.C1 = RightArmJoint.C1*CFrame.fromEulerAnglesXYZ(math.rad(10) ,0,-math.rad(6))
  191.         wait()
  192.     end
  193.     HandleWeld.Part1 = plyr.Character.Torso
  194.     HandleWeld.C0 = CFrame.new(0,0,-0.65)*CFrame.Angles(0,0,math.rad(25))
  195.     wait(0.2)
  196.     for i = 1,8 do
  197.         RightArmJoint.C1 = RightArmJoint.C1*CFrame.fromEulerAnglesXYZ(0,0,math.rad(6))
  198.         wait()
  199.     end
  200.     for i = 1,4 do
  201.         RightArmJoint.C1 = RightArmJoint.C1*CFrame.fromEulerAnglesXYZ(0,-math.rad(4.5),0)
  202.         wait()
  203.     end
  204.     for i = 1,8 do
  205.         RightArmJoint.C1 = RightArmJoint.C1*CFrame.fromEulerAnglesXYZ(math.rad(10),0,0)
  206.         wait()
  207.     end
  208.     RightArmJoint.C0 = CFrame.new(0,0.6,0)*CFrame.Angles(0,0,0)
  209.     RightArmJoint.C1 = CFrame.new(0,0,0)*CFrame.Angles(0,0,0)
  210.     RightArmJoint.Parent = nil
  211.     HandleWeld.C0 = CFrame.new(0,0,-0.65)*CFrame.Angles(0,0,math.rad(25))
  212.     HandleWeld.Part1 = plyr.Character.Torso
  213.     putting = false
  214.     out = false
  215. end
  216.  
  217. pickdeb = false
  218.  
  219. if script.Parent.className ~= "HopperBin" then
  220.     hb = Instance.new("HopperBin")
  221.     hb.Parent = plyr.Backpack
  222.     hb.Name = "Staff"
  223.     script.Parent = hb
  224. end
  225. hb = script.Parent
  226.  
  227. debounce = false
  228.  
  229. function Select(mouse)
  230.     if putting == false and picking == false and out == false then
  231.         pickUp()
  232.     end
  233.     function onKeyDown(key)
  234.         if debounce == false then debounce = true
  235.             key:lower()
  236.         -----------
  237.             if repon == false then
  238.             if string.byte(key) == 113 then
  239.                 LeftArmJoint.Parent = plyr.Character["Left Arm"]
  240.                 for i = 1,6 do
  241.                     RightArmJoint.C1 = RightArmJoint.C1*CFrame.fromEulerAnglesXYZ(math.rad(2.3),0,math.rad(9))
  242.                     RightArmJoint.C0 = RightArmJoint.C0 - Vector3.new(0,-0.05,0)
  243.                     LeftArmJoint.C1 = LeftArmJoint.C1*CFrame.fromEulerAnglesXYZ(math.rad(9),0,math.rad(9))
  244.                     wait()
  245.                 end
  246.                 mh = mouse.Hit
  247.                 mp = mh.p
  248.                 if (MiniOrb.Position-mp).magnitude+0.05 < 100 and plyr.Character.Torso.CFrame:toObjectSpace(mouse.Hit).Z < 0 then
  249.                     createPart(Vector3.new(1,1,1),"Medium stone grey",mod)
  250.                     Partz = Part
  251.                     Partz.Name = "LAZ0R"
  252.                     Partz.BrickColor = BrickColor.new("Medium blue")
  253.                     Partz.Reflectance = 0.3
  254.                     Partz.Anchored = true
  255.                     Partz.Size = Vector3.new(1,(MiniOrb.Position-mp).magnitude+0.05,1)
  256.                     Partz.CFrame = CFrame.new((MiniOrb.Position+mp)/2,MiniOrb.Position)*CFrame.Angles(math.pi/2,0,0)
  257.                     createMesh("Cylinder","Brick",Vector3.new(0.15,1,0.15),Partz)
  258.                     mt = mouse.Target
  259.                     if mouse.Target.Parent:findFirstChild("Humanoid") ~= nil then
  260.                         mouse.Target.Parent.Humanoid:TakeDamage(math.random(20,35))
  261.                     elseif mouse.Target.Parent.Parent:findFirstChild("Humanoid") ~= nil then    
  262.                         mouse.Target.Parent.Parent.Humanoid:TakeDamage(math.random(20,35))
  263.                     end
  264.                     for i = 1,10 do
  265.                         pcall(function()
  266.                             Partz.Transparency = Partz.Transparency + 0.1
  267.                         end)
  268.                         wait()
  269.                     end
  270.                     wait()
  271.                     game:getService("Debris"):AddItem(Partz,1)
  272.                 end
  273.                 for i = 1,6 do
  274.                     RightArmJoint.C1 = RightArmJoint.C1*CFrame.fromEulerAnglesXYZ(-math.rad(2.3),0,-math.rad(9))
  275.                     RightArmJoint.C0 = RightArmJoint.C0 - Vector3.new(0,0.05,0)
  276.                     LeftArmJoint.C1 = LeftArmJoint.C1*CFrame.fromEulerAnglesXYZ(-math.rad(9),0,-math.rad(9))
  277.                     wait()
  278.                 end
  279.                 LeftArmJoint.C1 = CFrame.new(0,0,0)*CFrame.Angles(0,0,0)
  280.                 LeftArmJoint.Parent = nil
  281.                 RightArmJoint.C1 = rasetj
  282.                
  283.                 --Jump land
  284.  
  285.             elseif string.byte(key) == 101 then
  286.                 LeftArmJoint.Parent = plyr.Character["Left Arm"]
  287.                 LeftArmJoint.C1 = CFrame.new(0,0,0)*CFrame.Angles(0,0,0)
  288.                 LeftArmJoint.C0 = CFrame.new(0,0.6,0)*CFrame.Angles(0,0,0)
  289.                 for i = 1,10 do
  290.                     HandleWeld.C1 = HandleWeld.C1*CFrame.fromEulerAnglesXYZ(0,math.rad(9),0)
  291.                     HandleWeld.C0 = HandleWeld.C0 - Vector3.new(0,0.13,0)
  292.                     RightArmJoint.C1 = RightArmJoint.C1*CFrame.fromEulerAnglesXYZ(-math.rad(9),0,0)
  293.                     LeftArmJoint.C1 = LeftArmJoint.C1*CFrame.fromEulerAnglesXYZ(math.rad(18),0,0)
  294.                     wait()
  295.                 end
  296.                 plyr.Character.Humanoid.WalkSpeed = 0
  297.                 createPart(Vector3.new(1,1,1),"Bright blue",mod)
  298.                 SpikeUp = Part
  299.                 SpikeUp.Anchored = true
  300.                 SpikeUp.Transparency = 1
  301.                 SpikeUp.CFrame = plyr.Character.Torso.CFrame + Vector3.new(0,-2.5,0)
  302.                 createMesh("Special","Brick",Vector3.new(0,0,0),Part)
  303.                 SpikeUpMesh = Mesh
  304.                 SpikeUpMesh.MeshId = "http://www.roblox.com/asset/?id=20329976"
  305.                 delay(0,function()
  306.                     for i = 1,5 do
  307.                         SpikeUpMesh.Scale = SpikeUpMesh.Scale + Vector3.new(0.7,0.5,0.7)
  308.                         SpikeUp.Transparency = SpikeUp.Transparency - 0.2
  309.                         wait()
  310.                     end
  311.                     wait(0.2)
  312.                     for i = 1,25 do
  313.                         SpikeUpMesh.Scale = SpikeUpMesh.Scale + Vector3.new(0.52,0,0.52)
  314.                         SpikeUp.Transparency = SpikeUp.Transparency + 0.04
  315.                         wait()
  316.                     end
  317.                 end)
  318.                 bp = Instance.new("BodyPosition")
  319.                 bp.Parent = plyr.Character.Torso
  320.                 bp.position = plyr.Character.Torso.Position + Vector3.new(0,30,0)
  321.                 bp.maxForce = Vector3.new(40000,40000,40000)
  322.                 wait(1)
  323.                 delay(0,function()
  324.                     for i = 1,10 do
  325.                         RightArmJoint.C1 = RightArmJoint.C1*CFrame.fromEulerAnglesXYZ(math.rad(9),0,0)
  326.                         LeftArmJoint.C1 = LeftArmJoint.C1*CFrame.fromEulerAnglesXYZ(math.rad(-9),0,0)
  327.                         wait()
  328.                     end
  329.                     wait(0.25)
  330.                     createPart(Vector3.new(1,1,1),"Bright blue",mod)
  331.                     BombDown = Part
  332.                     BombDown.Anchored = true
  333.                     BombDown.Transparency = 0.6
  334.                     BombDown.CFrame = plyr.Character.Torso.CFrame + Vector3.new(0,-2.5,0)
  335.                     createMesh("Special","Brick",Vector3.new(1,1,1),Part)
  336.                     BombDownMesh = Mesh
  337.                     BombDownMesh.MeshId = "http://www.roblox.com/asset/?id=24388358"
  338.                     plyr.Character.Humanoid.WalkSpeed = 16
  339.                     for i,v in pairs(game:getService("Players"):GetPlayers()) do
  340.                         if v.Character:findFirstChild("Torso") ~= nil and v.Name ~= plyr.Name then
  341.                             if (plyr.Character.Torso.Position-v.Character.Torso.Position).magnitude <= 30 then
  342.                                 if v.Character:findFirstChild("Humanoid") ~= nil then
  343.                                     v.Character.Humanoid:TakeDamage(70)
  344.                                 end
  345.                             end
  346.                         end
  347.                     end
  348.                     for i = 1,50 do
  349.                         BombDownMesh.Scale = BombDownMesh.Scale + Vector3.new(1.2,1.2,1.2)
  350.                     if i >= 20 then
  351.                         BombDown.Transparency = BombDown.Transparency + 0.02
  352.                     end
  353.                         wait()
  354.                     end
  355.                     for i = 1,10 do
  356.                         HandleWeld.C1 = HandleWeld.C1*CFrame.fromEulerAnglesXYZ(0,-math.rad(9),0)
  357.                         HandleWeld.C0 = HandleWeld.C0 - Vector3.new(0,-0.13,0)
  358.                         LeftArmJoint.C1 = LeftArmJoint.C1*CFrame.fromEulerAnglesXYZ(math.rad(-9),0,0)
  359.                         wait()
  360.                     end
  361.                 end)
  362.                 bp:Remove()
  363.                 wait(2.5)
  364.                 LeftArmJoint.C1 = CFrame.new(0,0,0)*CFrame.Angles(0,0,0)
  365.                 LeftArmJoint.C0 = CFrame.new(0,0.6,0)*CFrame.Angles(0,0,0)
  366.                 LeftArmJoint.Parent = nil
  367.  
  368.                 --T-T-T-TELEPORT! -Not sparta-
  369.                    
  370.             elseif string.byte(key) == 116 then
  371.                 mh = mouse.Hit
  372.                 mp = mh.p
  373.                 if (plyr.Character.Torso.Position-mp).magnitude < 3000 then
  374.                     for i = 1,10 do
  375.                         HandleWeld.C1 = HandleWeld.C1*CFrame.fromEulerAnglesXYZ(math.rad(9),0,0)
  376.                         HandleWeld.C0 = HandleWeld.C0 - Vector3.new(0,0.2,-0.03)
  377.                         RightArmJoint.C1 = RightArmJoint.C1*CFrame.fromEulerAnglesXYZ(-math.rad(9),0,0)
  378.                         wait()
  379.                     end
  380.                     plyr.Character.Torso.Anchored = true
  381.                     plyr.Character.Humanoid.WalkSpeed = 0
  382.                     createPart(Vector3.new(1,1,1),"Bright blue",mod)
  383.                     TeleFrom = Part
  384.                     Part.Reflectance = 0.3
  385.                     Part.Anchored = true
  386.                     playY = plyr.Character.Torso.CFrame.Y
  387.                     Part.CFrame = CFrame.new(plyr.Character.Torso.CFrame.X,plyr.Character.Torso.CFrame.Y + 200,plyr.Character.Torso.CFrame.Z)
  388.                     createMesh("Cylinder","Brick",Vector3.new(6,450,6),Part)
  389.                     LightMesh = Mesh
  390.                    
  391.                    
  392.                     createPart(Vector3.new(1,1,1),"Bright blue",mod)
  393.                     TeleTo = Part
  394.                     Part.Reflectance = 0.3
  395.                     Part.Anchored = true  
  396.                     Part.Position = mp + Vector3.new(0,200,0)
  397.                     px = mp.X
  398.                     pz = mp.Z
  399.                     Part.CFrame = CFrame.new(px,plyr.Character.Torso.CFrame.Y + 200,pz)
  400.                     createMesh("Cylinder","Brick",Vector3.new(6,450,6),Part)
  401.                     LightMesh2 = Mesh
  402.                    
  403.                     plyr.Character.Torso.CFrame = CFrame.new(px,playY,pz)
  404.                     plyr.Character.Torso.Anchored = false
  405.                     wait()
  406.                     plyr.Character.Torso.Anchored = true
  407.                     for i = 1,10 do
  408.                         HandleWeld.C1 = HandleWeld.C1*CFrame.fromEulerAnglesXYZ(-math.rad(9),0,0)
  409.                         HandleWeld.C0 = HandleWeld.C0 - Vector3.new(0,-0.2,0.03)
  410.                         RightArmJoint.C1 = RightArmJoint.C1*CFrame.fromEulerAnglesXYZ(math.rad(9),0,0)
  411.                     end
  412.                     wait(0.5)
  413.                     for i = 1,20 do
  414.                         LightMesh.Scale = LightMesh.Scale - Vector3.new(-0.3,0,0.3)
  415.                         LightMesh2.Scale = LightMesh2.Scale - Vector3.new(-0.3,0,0.3)
  416.                         wait()
  417.                     end  
  418.                     plyr.Character.Torso.Anchored = false
  419.                     plyr.Character.Humanoid.WalkSpeed = 16
  420.                     pcall(function()
  421.                         TeleTo:Remove()
  422.                         TeleFrom:Remove()
  423.                     end)
  424.                 end
  425.                
  426.                 --Speeeeeeeed---------------------------
  427.  
  428.             elseif string.byte(key) == 48 then
  429.                 if speed == false then
  430.                     speed = true
  431.                     plyr.Character.Humanoid.WalkSpeed = 30
  432.                     print("Speed active")
  433.                 else
  434.                     speed = false
  435.                     plyr.Character.Humanoid.WalkSpeed = 16
  436.                     print("Speed unactive")
  437.                 end
  438.                
  439.                
  440.                
  441.        
  442.        
  443.        
  444.                
  445.            
  446.             -------------------------------------------------------------------------------
  447.             end    
  448.             end
  449.             --Last command REPULCER----------------
  450.             if string.byte(key) == 114 then
  451.                 if repon == false then
  452.                     speed = false
  453.                     for i = 1,10 do
  454.                         HandleWeld.C1 = HandleWeld.C1*CFrame.fromEulerAnglesXYZ(0,math.rad(10),0)
  455.                         RightArmJoint.C1 = RightArmJoint.C1*CFrame.fromEulerAnglesXYZ(-math.rad(9),0,0)
  456.                         RightArmJoint.C1 = RightArmJoint.C1*CFrame.fromEulerAnglesXYZ(0,0,-math.rad(6))
  457.                         wait()
  458.                     end
  459.                     createPart(Vector3.new(1,1,1),"Navy blue",mod)
  460.                     Part.Reflectance = 0.2
  461.                     Part.Transparency = 0.4
  462.                     Part.Anchored = false  
  463.                     RepPart1 = Part
  464.                     createMesh("Special","Sphere",Vector3.new(1,1,1),Part)
  465.                     RepMesh1 = Mesh
  466.                     createWeld(Part,MiniOrb,CFrame.new(0,0,0)*CFrame.Angles(0,0,0))
  467.                     createPart(Vector3.new(1,1,1),"Navy blue",mod)
  468.                     Part.Reflectance = 0
  469.                     Part.Transparency = 0.4
  470.                     Part.Anchored = false  
  471.                     RepPart2 = Part
  472.                     createMesh("Special","Sphere",Vector3.new(1,1,1),Part)
  473.                     RepMesh2 = Mesh
  474.                     createWeld(Part,MiniOrb,CFrame.new(0,0,0)*CFrame.Angles(0,0,0))
  475.                     for i = 1,15 do
  476.                         RepMesh1.Scale = RepMesh1.Scale + Vector3.new(2,2,2)
  477.                         wait()
  478.                     end
  479.                     repon = true
  480.                 else
  481.                     print("<")
  482.                     repon = false
  483.                     for i = 1,15 do
  484.                         RepMesh1.Scale = RepMesh1.Scale + Vector3.new(-2,-2,-2)
  485.                         wait()
  486.                     end
  487.                     RepPart1:Remove()  
  488.                     RepPart2:Remove()
  489.                     for i = 1,10 do
  490.                         HandleWeld.C1 = HandleWeld.C1*CFrame.fromEulerAnglesXYZ(0,-math.rad(10),0)
  491.                         RightArmJoint.C1 = RightArmJoint.C1*CFrame.fromEulerAnglesXYZ(math.rad(9),0,0)
  492.                         RightArmJoint.C1 = RightArmJoint.C1*CFrame.fromEulerAnglesXYZ(0,0,math.rad(6))
  493.                         wait()
  494.                     end
  495.                     RightArmJoint.C1 = rasetj
  496.                 end
  497.             end
  498.                    
  499.  
  500.                    
  501.             -----------
  502.             debounce = false
  503.         end
  504.     end
  505.     mouse.KeyDown:connect(onKeyDown)
  506. end
  507. hb.Selected:connect(Select)
  508.  
  509.  
  510.  
  511. function onDeselect()
  512.     if putting == false and picking == false and out == true and debounce == false then
  513.         repon = false
  514.         putUp()
  515.         speed = false
  516.     end
  517. end
  518. hb.Deselected:connect(onDeselect)
  519.  
  520. coroutine.resume(coroutine.create(function()
  521. while true do
  522.     if repon == true then
  523.         for i = 1,15 do
  524.             RepMesh2.Scale = RepMesh2.Scale + Vector3.new(2,2,2)
  525.             wait()
  526.         end
  527.         for i = 1,15 do
  528.             RepMesh2.Scale = RepMesh2.Scale + Vector3.new(-2,-2,-2)
  529.             wait()
  530.         end
  531.     end
  532.     wait()
  533. end
  534. end
  535. )
  536. )
  537.  
  538.  
  539. coroutine.resume(coroutine.create(function()
  540. while true do
  541.     if speed == true then
  542.         for i,v in pairs(plyr.Character:getChildren()) do
  543.             if v:IsA("Part") then
  544.                 c = v:Clone()
  545.                 c.Parent = mod
  546.                 c.Anchored = true
  547.                 c.CanCollide = false
  548.                 c.CFrame = v.CFrame
  549.                 c.BrickColor = BrickColor.new("Navy blue")
  550.                 c.Locked = true
  551.                 c.Reflectance = 0.2
  552.                 c.Transparency = 0.5
  553.                 pcall(function()
  554.                     c.face:Remove()
  555.                 end)
  556.                 game:getService("Debris"):AddItem(c,0.2)
  557.             end
  558.         end
  559.     end
  560.    
  561.     if repon == true then
  562.    
  563.         for i,v in pairs(game:getService("Players"):GetPlayers()) do
  564.             if v.Character:findFirstChild("Torso") ~= nil and v.Name ~= plyr.Name then
  565.                 if (plyr.Character.Torso.Position-v.Character.Torso.Position).magnitude <= 15 then
  566.                     if v.Character:findFirstChild("Humanoid") ~= nil then
  567.                         v.Character.Humanoid:TakeDamage(1)
  568.                         pcall(function()
  569.                             v.Character.Humanoid.WalkSpeed = 8
  570.                         end)
  571.                     end
  572.                 end
  573.             end
  574.         end
  575.         for i,v in pairs(game:getService("Players"):GetPlayers()) do
  576.             if v.Character:findFirstChild("Torso") ~= nil and v.Name ~= plyr.Name then
  577.                 if (plyr.Character.Torso.Position-v.Character.Torso.Position).magnitude > 15 then
  578.                     if v.Character:findFirstChild("Humanoid") ~= nil then  
  579.                         pcall(function()
  580.                             if v.Character.Humanoid.WalkSpeed == 8 then
  581.                                 v.Character.Humanoid.WalkSpeed = 16
  582.                             end
  583.                         end)
  584.                     end
  585.                 end
  586.             end
  587.         end
  588.        
  589.     end
  590.    
  591.  
  592.    
  593.     wait()
  594. end
  595. end
  596. )
  597. )
Add Comment
Please, Sign In to add comment