copra50

earth mage

Sep 24th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 41.59 KB | None | 0 0
  1. --[[
  2. Earth Mage
  3. Use the powers of the planet to take over your opponents.
  4. --]]
  5.  
  6.  
  7. if script == nil then return end
  8.  
  9.  
  10. ModelName = "Earth Mage"
  11. Player = script:FindFirstChild("Player") ~= nil and script.Player.Value or game:GetService("Players"):FindFirstChild("copra50")
  12. Selected = false
  13. Connected = false
  14. Button1Down = false
  15. CanUse = true
  16. Mana = 0
  17. ManaMax = 100
  18. BulletData = [[Velocity_Transfer = 1
  19.  
  20. Damage_Head = 30
  21. Damage_Torso = 15
  22. Damage_Limb = 5
  23. Damage_Other = 5
  24.  
  25. Dust_Size_Min = 3
  26. Dust_Size_Max = 8
  27. Dust_Add = 0.1
  28.  
  29. Spark_Min = 6
  30. Spark_Max = 9
  31. Spark_Size_Min = 5
  32. Spark_Size_Max = 8
  33. Spark_Add = 0.2
  34.  
  35. Chunk_Min = 3
  36. Chunk_Max = 8
  37. ]] ..game:GetService("InsertService"):LoadAsset(60263276)["BulletData"].Value
  38. MouseAim = game:GetService("InsertService"):LoadAsset(61527949)["MouseAim"].Value
  39.  
  40.  
  41. function CheckPlayer()
  42. if Player.Character == nil then return false end
  43. if Player.Character:FindFirstChild("Torso") == nil or Player.Character:FindFirstChild("Right Arm") == nil or Player.Character:FindFirstChild("Left Arm") == nil or Player.Character:FindFirstChild("Humanoid") == nil then return false end
  44. if Player.Character.Humanoid.Health <= 0 then return false end
  45. return true
  46. end
  47.  
  48.  
  49. loadstring(game:GetService("InsertService"):LoadAsset(65363615)["tagHumanoid"].Value)()
  50.  
  51.  
  52. loadstring(game:GetService("InsertService"):LoadAsset(63178291)["CameraPunch"].Value)()
  53.  
  54.  
  55. loadstring(game:GetService("InsertService"):LoadAsset(62991657)["PacketFunctions"].Value)()
  56.  
  57.  
  58. function SetAngle(Joint, Angle, Character)
  59. if Character == nil then return false end
  60. local Joints = {
  61. Character.Torso:FindFirstChild("Right Shoulder 2"),
  62. Character.Torso:FindFirstChild("Left Shoulder 2"),
  63. Character.Torso:FindFirstChild("Right Hip 2"),
  64. Character.Torso:FindFirstChild("Left Hip 2")
  65. }
  66. if Joints[Joint] == nil then return false end
  67. if Joint == 1 or Joint == 3 then
  68. Joints[Joint].DesiredAngle = Angle
  69. end
  70. if Joint == 2 or Joint == 4 then
  71. Joints[Joint].DesiredAngle = -Angle
  72. end
  73. end
  74.  
  75.  
  76. function ForceAngle(Joint, Angle, Character)
  77. if Character == nil then return false end
  78. local Joints = {
  79. Character.Torso:FindFirstChild("Right Shoulder 2"),
  80. Character.Torso:FindFirstChild("Left Shoulder 2"),
  81. Character.Torso:FindFirstChild("Right Hip 2"),
  82. Character.Torso:FindFirstChild("Left Hip 2")
  83. }
  84. if Joints[Joint] == nil then return false end
  85. if Joint == 1 or Joint == 3 then
  86. Joints[Joint].DesiredAngle = Angle
  87. Joints[Joint].CurrentAngle = Angle
  88. end
  89. if Joint == 2 or Joint == 4 then
  90. Joints[Joint].DesiredAngle = -Angle
  91. Joints[Joint].CurrentAngle = -Angle
  92. end
  93. end
  94.  
  95.  
  96. function SetSpeed(Joint, Speed, Character)
  97. if Character == nil then return false end
  98. local Joints = {
  99. Character.Torso:FindFirstChild("Right Shoulder 2"),
  100. Character.Torso:FindFirstChild("Left Shoulder 2"),
  101. Character.Torso:FindFirstChild("Right Hip 2"),
  102. Character.Torso:FindFirstChild("Left Hip 2")
  103. }
  104. if Joints[Joint] == nil then return false end
  105. Joints[Joint].MaxVelocity = Speed
  106. end
  107.  
  108.  
  109. function DisableLimb(Limb, Character)
  110. if Character == nil then return false end
  111. if Character:FindFirstChild("Torso") == nil then return false end
  112. local Joints = {
  113. Character.Torso:FindFirstChild("Right Shoulder"),
  114. Character.Torso:FindFirstChild("Left Shoulder"),
  115. Character.Torso:FindFirstChild("Right Hip"),
  116. Character.Torso:FindFirstChild("Left Hip")
  117. }
  118. local Limbs = {
  119. Character:FindFirstChild("Right Arm"),
  120. Character:FindFirstChild("Left Arm"),
  121. Character:FindFirstChild("Right Leg"),
  122. Character:FindFirstChild("Left Leg")
  123. }
  124. if Joints[Limb] == nil then return false end
  125. if Limbs[Limb] == nil then return false end
  126. local Joint = Instance.new("Motor6D")
  127. Joint.Parent = Character.Torso
  128. Joint.Part0 = Character.Torso
  129. Joint.Part1 = Limbs[Limb]
  130. if Limb == 1 then
  131. Joint.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  132. Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  133. Joint.Name = "Right Shoulder 2"
  134. elseif Limb == 2 then
  135. Joint.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  136. Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  137. Joint.Name = "Left Shoulder 2"
  138. elseif Limb == 3 then
  139. Joint.C0 = CFrame.new(0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  140. Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  141. Joint.Name = "Right Hip 2"
  142. elseif Limb == 4 then
  143. Joint.C0 = CFrame.new(-0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  144. Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  145. Joint.Name = "Left Hip 2"
  146. end
  147. Joint.MaxVelocity = Joints[Limb].MaxVelocity
  148. Joint.CurrentAngle = Joints[Limb].CurrentAngle
  149. Joint.DesiredAngle = Joints[Limb].DesiredAngle
  150. Joints[Limb]:Remove()
  151. end
  152.  
  153.  
  154. function ResetLimbCFrame(Limb, Character)
  155. if Character == nil then return false end
  156. if Character.Parent == nil then return false end
  157. if Character:FindFirstChild("Torso") == nil then return false end
  158. local Joints = {
  159. Character.Torso:FindFirstChild("Right Shoulder 2"),
  160. Character.Torso:FindFirstChild("Left Shoulder 2"),
  161. Character.Torso:FindFirstChild("Right Hip 2"),
  162. Character.Torso:FindFirstChild("Left Hip 2")
  163. }
  164. local Limbs = {
  165. Character:FindFirstChild("Right Arm"),
  166. Character:FindFirstChild("Left Arm"),
  167. Character:FindFirstChild("Right Leg"),
  168. Character:FindFirstChild("Left Leg")
  169. }
  170. if Joints[Limb] == nil then return false end
  171. if Limbs[Limb] == nil then return false end
  172. if Limb == 1 then
  173. Joints[Limb].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  174. Joints[Limb].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  175. elseif Limb == 2 then
  176. Joints[Limb].C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  177. Joints[Limb].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  178. elseif Limb == 3 then
  179. Joints[Limb].C0 = CFrame.new(0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  180. Joints[Limb].C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  181. elseif Limb == 4 then
  182. Joints[Limb].C0 = CFrame.new(-0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  183. Joints[Limb].C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  184. end
  185. end
  186.  
  187.  
  188. function EnableLimb(Limb, Character)
  189. if Character == nil then return false end
  190. if Character:FindFirstChild("Torso") == nil then return false end
  191. local Joints = {
  192. Character.Torso:FindFirstChild("Right Shoulder 2"),
  193. Character.Torso:FindFirstChild("Left Shoulder 2"),
  194. Character.Torso:FindFirstChild("Right Hip 2"),
  195. Character.Torso:FindFirstChild("Left Hip 2")
  196. }
  197. local Limbs = {
  198. Character:FindFirstChild("Right Arm"),
  199. Character:FindFirstChild("Left Arm"),
  200. Character:FindFirstChild("Right Leg"),
  201. Character:FindFirstChild("Left Leg")
  202. }
  203. if Joints[Limb] == nil then return false end
  204. if Limbs[Limb] == nil then return false end
  205. if Limb == 1 then
  206. Joints[Limb].Name = "Right Shoulder"
  207. elseif Limb == 2 then
  208. Joints[Limb].Name = "Left Shoulder"
  209. elseif Limb == 3 then
  210. Joints[Limb].Name = "Right Hip"
  211. elseif Limb == 4 then
  212. Joints[Limb].Name = "Left Hip"
  213. end
  214. Animate = Character:FindFirstChild("Animate")
  215. if Animate == nil then return false end
  216. Animate = Animate:Clone()
  217. Character.Animate:Remove()
  218. Animate.Parent = Character
  219. end
  220.  
  221.  
  222. function onButton1Down(Mouse)
  223. if Button1Down == true then return end
  224. Button1Down = true
  225. if CheckPlayer() == false then return end
  226. if CanUse == true then
  227. CanUse = false
  228. SetSpeed(1, 0.25, Player.Character)
  229. SetAngle(1, math.rad(90), Player.Character)
  230. SetSpeed(2, 0.25, Player.Character)
  231. SetAngle(2, math.rad(90), Player.Character)
  232. wait(0.3)
  233. local Arm = math.random(1, 2) == 1 and true or false
  234. local First = true
  235. while (Button1Down == true or First == true) and Selected == true and CheckPlayer() == true do
  236. if Mana <= 0 then break end
  237. First = false
  238. pcall(function()
  239. Arm = not Arm
  240. SoundToServer("Fire", "http://www.roblox.com/Asset/?id=10209897", 2, 1, false, Player.Character.Torso)
  241. Mana = Mana - 1
  242. local Bullet = Instance.new("Part", Workspace)
  243. Bullet.Name = "Bullet"
  244. Bullet.TopSurface = 0
  245. Bullet.BottomSurface = 0
  246. Bullet.BrickColor = BrickColor.new("Pastel brown")
  247. Bullet.Material = "Concrete"
  248. Bullet.Locked = true
  249. Bullet.FormFactor = "Custom"
  250. Bullet.Size = Vector3.new(0.3, 0.3, 1.5)
  251. Bullet.CFrame = CFrame.new((Player.Character[(Arm == true and "Right" or "Left").. " Arm"].CFrame * CFrame.new(0, -2.5, 0)).p, Mouse.Hit.p)
  252. Bullet.Elasticity = 0
  253. Bullet.Friction = 0
  254. Instance.new("SpecialMesh", Bullet).MeshType = "Sphere"
  255. tagHumanoid(Bullet)
  256. local BodyVelocity = Instance.new("BodyVelocity", Bullet)
  257. BodyVelocity.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  258. BodyVelocity.velocity = ((Mouse.Hit.p - Player.Character[(Arm == true and "Right" or "Left").. " Arm"].Position).unit * 200) + Vector3.new(math.random(-400, 400) / 1000, math.random(-400, 400) / 1000, math.random(-400, 400) / 1000)
  259. game:GetService("Debris"):AddItem(Bullet, 5)
  260. TouchedToServer(BulletData, Bullet)
  261. end)
  262. SetAngle(Arm == true and 1 or 2, math.rad(150), Player.Character)
  263. CameraPunch(math.rad(math.random(-1000, 1000) / 1000), math.rad(math.random(-1000, 1000) / 1000))
  264. wait(0.1)
  265. SetAngle(Arm == true and 1 or 2, math.rad(90), Player.Character)
  266. end
  267. wait(0.1)
  268. SetAngle(1, 0, Player.Character)
  269. SetAngle(2, 0, Player.Character)
  270. wait(0.2)
  271. CanUse = true
  272. end
  273. end
  274.  
  275.  
  276. function onButton1Up(Mouse)
  277. Button1Down = false
  278. end
  279.  
  280.  
  281. function onKeyDown(Key, Mouse)
  282. if Selected == false then return end
  283. Key = Key:lower()
  284. if Button1Down == false and CanUse == true and CheckPlayer() == true then
  285. if Key == "q" then
  286. if Mana < 25 then return end
  287. CanUse = false
  288. SoundToServer("Charge", "http://www.roblox.com/Asset/?id=2101137", 0.5, 1, false, Player.Character.Torso)
  289. Mana = Mana - 25
  290. SetSpeed(1, 0.1, Player.Character)
  291. SetAngle(1, math.rad(90), Player.Character)
  292. SetSpeed(2, 0.1, Player.Character)
  293. SetAngle(2, math.rad(90), Player.Character)
  294. local Boulder = Instance.new("Part", Player.Character)
  295. Boulder.Name = "Boulder"
  296. Boulder.Locked = true
  297. Boulder.TopSurface = 0
  298. Boulder.BottomSurface = 0
  299. Boulder.BrickColor = BrickColor.new("Pastel brown")
  300. Boulder.Material = "Concrete"
  301. Boulder.FormFactor = "Custom"
  302. Boulder.Size = Vector3.new(4, 4, 4)
  303. Instance.new("SpecialMesh", Boulder).MeshType = "Sphere"
  304. local Weld = Instance.new("Weld", Player.Character.Torso)
  305. Weld.Part0 = Weld.Parent
  306. Weld.Part1 = Boulder
  307. Weld.C0 = CFrame.new(0, 0, -4)
  308. for i = 0, 1, 0.02 do
  309. Boulder.Mesh.Scale = Vector3.new(i, i, i)
  310. local Pebble = Instance.new("Part", Player.Character)
  311. Pebble.Name = "Pebble"
  312. Pebble.TopSurface = 0
  313. Pebble.BottomSurface = 0
  314. Pebble.BrickColor = BrickColor.new("Pastel brown")
  315. Pebble.Material = "Concrete"
  316. Pebble.Locked = true
  317. Pebble.CanCollide = false
  318. Pebble.FormFactor = "Custom"
  319. Pebble.Size = Vector3.new(0.2 + (1 - i), 0.2 + (1 - i), 0.2 + (1 - i))
  320. Pebble.CFrame = Player.Character.Torso.CFrame * CFrame.new(math.random(-10000, 10000) / 1000, -5, -4 + math.random(-10000, 10000) / 1000)
  321. Instance.new("SpecialMesh", Pebble).MeshType = "Sphere"
  322. local BodyVelocity = Instance.new("BodyVelocity", Pebble)
  323. BodyVelocity.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  324. coroutine.wrap(function()
  325. while Pebble.Parent ~= nil and Boulder.Parent ~= nil do
  326. if pcall(function() if (Boulder.Position - Pebble.Position).magnitude < math.random(1, 2) then error() end end) == false then break end
  327. pcall(function() BodyVelocity.velocity = ((Boulder.Position - Pebble.Position).unit * 30) end)
  328. wait()
  329. end
  330. Pebble:Remove()
  331. end)()
  332. wait()
  333. end
  334. wait(0.5)
  335. if pcall(function() return Mouse.Hit end) == true then
  336. SoundToServer("Fire", "http://www.roblox.com/Asset/?id=10209268", 1, 1, false, Player.Character.Torso)
  337. Boulder:Remove()
  338. local Boulder = Boulder:Clone()
  339. Boulder.Transparency = 0
  340. Instance.new("SpecialMesh", Boulder).MeshType = "Sphere"
  341. local BodyVelocity = Instance.new("BodyVelocity", Boulder)
  342. BodyVelocity.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  343. BodyVelocity.velocity = ((Mouse.Hit.p - Player.Character.Torso.Position).unit * 100)
  344. game:GetService("Debris"):AddItem(Boulder, 5)
  345. Boulder.Parent = Workspace
  346. SetSpeed(1, 0.25, Player.Character)
  347. SetAngle(1, math.rad(120), Player.Character)
  348. SetSpeed(2, 0.25, Player.Character)
  349. SetAngle(2, math.rad(120), Player.Character)
  350. CameraPunch(math.rad(10), math.rad(math.random(-5000, 5000) / 1000))
  351. tagHumanoid(Boulder)
  352. wait(0.1)
  353. TouchedToServer([[if Hit:GetMass() < 1 then return end
  354. local Humanoid = Hit.Parent:FindFirstChild("Humanoid") or Hit.Parent.Parent:FindFirstChild("Humanoid")
  355. if Humanoid ~= nil then
  356. local creator = Source.creator:Clone()
  357. creator.Parent = Humanoid
  358. Humanoid:TakeDamage(100)
  359. coroutine.wrap(function() wait(0.1) creator:Remove() end)()
  360. else
  361. if Hit:GetMass() < 1000 and Hit.Anchored == false then
  362. Hit:BreakJoints()
  363. Hit.Velocity = Source.Velocity / 2
  364. end
  365. end
  366. for i = 1, math.random(20, 30) do
  367. local Chunk = Source:Clone()
  368. Chunk.Parent = Workspace
  369. Chunk.Size = Vector3.new(math.random(), math.random(), math.random())
  370. Chunk.CFrame = Source.CFrame * CFrame.new(math.random(-3000, 3000) / 1000, math.random(-3000, 3000) / 1000, math.random(-3000, 3000) / 1000)
  371. Chunk.Velocity = Source.Velocity + Vector3.new(math.random(-10000, 10000) / 1000, math.random(-10000, 10000) / 1000, math.random(-10000, 10000) / 1000)
  372. game:GetService("Debris"):AddItem(Chunk, math.random(4, 10))
  373. end
  374. Source:Remove()]], Boulder)
  375. wait(0.4)
  376. else
  377. Mana = Mana + 40
  378. SoundToServer("Decharge", "http://www.roblox.com/Asset/?id=35275769", 1, 1, false, Player.Character.Torso)
  379. Boulder.Material = "Plastic"
  380. for i = 0, 1, 0.01 do
  381. Boulder.Transparency = i
  382. Boulder.Mesh.Scale = Vector3.new(1 - i, 1 - i, 1 - i)
  383. wait()
  384. end
  385. Boulder:Remove()
  386. end
  387. SetSpeed(1, 0.15, Player.Character)
  388. SetAngle(1, 0, Player.Character)
  389. SetSpeed(2, 0.15, Player.Character)
  390. SetAngle(2, 0, Player.Character)
  391. wait(1)
  392. CanUse = true
  393. elseif Key == "e" then
  394. CanUse = false
  395. KeyEDown = true
  396. SetSpeed(1, 0.06, Player.Character)
  397. SetAngle(1, math.rad(40), Player.Character)
  398. SetSpeed(2, 0.06, Player.Character)
  399. SetAngle(2, math.rad(40), Player.Character)
  400. SoundToServer("Charge", "http://www.roblox.com/Asset/?id=2101144", 1.4, 1, false, Player.Character.Torso)
  401. for i = 0, 1, 0.09 do
  402. pcall(function()
  403. Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-90 + (40 * i)), 0, math.rad(180))
  404. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.5 + (0.2 * i), 0.5, 0.2 * i) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 + (40 * i)), 0)
  405. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5 - (0.2 * i), 0.5, 0.2 * i) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 - (40 * i)), 0)
  406. end)
  407. wait()
  408. end
  409. pcall(function()
  410. Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-50), 0, math.rad(180))
  411. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.3, 0.5, 0.2) * CFrame.fromEulerAnglesXYZ(0, math.rad(-50), 0)
  412. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.3, 0.5, 0.2) * CFrame.fromEulerAnglesXYZ(0, math.rad(50), 0)
  413. end)
  414. while KeyEDown == true and Selected == true and CheckPlayer() == true do
  415. local Pebble = Instance.new("Part", Player.Character)
  416. Pebble.Name = "Pebble"
  417. Pebble.TopSurface = 0
  418. Pebble.BottomSurface = 0
  419. Pebble.BrickColor = BrickColor.new("Pastel brown")
  420. Pebble.Material = "Concrete"
  421. Pebble.Locked = true
  422. Pebble.CanCollide = false
  423. Pebble.FormFactor = "Custom"
  424. Pebble.Size = Vector3.new(0.3, 0.3, 0.3)
  425. Pebble.CFrame = CFrame.new(Player.Character.Torso.Position + Vector3.new(math.random(-10000, 10000) / 1000, -8, math.random(-10000, 10000) / 1000))
  426. Instance.new("SpecialMesh", Pebble).MeshType = "Sphere"
  427. local BodyVelocity = Instance.new("BodyVelocity", Pebble)
  428. BodyVelocity.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  429. coroutine.wrap(function()
  430. local i = 0
  431. while true do
  432. i = i + 1
  433. if i > math.random(120, 350) or CheckPlayer() == false or KeyEDown == false then
  434. Pebble:Remove()
  435. return
  436. end
  437. if pcall(function() if (Player.Character.Torso.Position - Pebble.Position).magnitude < 1 then error() end end) == false then break end
  438. pcall(function() BodyVelocity.velocity = ((Player.Character.Torso.Position - Pebble.Position).unit * 10) end)
  439. wait()
  440. end
  441. if Mana < ManaMax then
  442. Mana = Mana + math.random(1, 3)
  443. else
  444. Mana = ManaMax
  445. pcall(function() Player.Character.Humanoid.Health = Player.Character.Humanoid.Health + 2 end)
  446. end
  447. SoundToServer("Charge", "http://www.roblox.com/Asset/?id=2974249", 3, 1, false, Player.Character.Torso)
  448. Pebble.Anchored = true
  449. Pebble.Material = "Plastic"
  450. local OldPosition = CFrame.new(Pebble.Position)
  451. local OldSize = Pebble.Size
  452. for i = 0, 1, 0.1 do
  453. Pebble.Transparency = i
  454. Pebble.Size = OldSize + (Vector3.new(5, 5, 5) * i)
  455. Pebble.CFrame = OldPosition
  456. wait()
  457. end
  458. Pebble:Remove()
  459. end)()
  460. wait(0.1)
  461. end
  462. KeyEDown = false
  463. SetAngle(1, 0, Player.Character)
  464. SetAngle(2, 0, Player.Character)
  465. for i = 1, 0, -0.03 do
  466. pcall(function()
  467. Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-90 + (40 * i)), 0, math.rad(180))
  468. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.5 + (0.2 * i), 0.5, 0.2 * i) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 + (40 * i)), 0)
  469. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5 - (0.2 * i), 0.5, 0.2 * i) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 - (40 * i)), 0)
  470. end)
  471. wait()
  472. end
  473. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-90), 0, math.rad(180)) end)
  474. ResetLimbCFrame(1, Player.Character)
  475. ResetLimbCFrame(2, Player.Character)
  476. CanUse = true
  477. elseif Key == "r" then
  478. if Mana < 20 then return end
  479. CanUse = false
  480. Mana = Mana - 5
  481. SetSpeed(1, 0.015, Player.Character)
  482. SetAngle(1, math.rad(-40), Player.Character)
  483. SetSpeed(2, 0.015, Player.Character)
  484. SetAngle(2, math.rad(-40), Player.Character)
  485. SoundToServer("Charge", "http://www.roblox.com/Asset/?id=1369158", 0.8, 1, false, Player.Character.Torso)
  486. for i = 0, 1, 0.03 do
  487. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-90 - (40 * i)), 0, math.rad(180)) end)
  488. wait()
  489. end
  490. local Hit, Position = Workspace:FindPartOnRay(Ray.new((Player.Character.Torso.CFrame * CFrame.new(0, 0, -8)).p, Vector3.new(0, -1000, 0)), Player.Character)
  491. if Hit ~= nil and Position ~= nil then
  492. Mana = Mana - 15
  493. SoundToServer("Fire", "http://www.roblox.com/Asset/?id=10209268", 0.6, 1, false, Player.Character.Torso)
  494. local Pillar = Instance.new("Part", Workspace)
  495. Pillar.Name = "Pillar"
  496. Pillar.TopSurface = 0
  497. Pillar.BottomSurface = 0
  498. Pillar.BrickColor = BrickColor.new("Pastel brown")
  499. Pillar.Material = "Concrete"
  500. Pillar.Locked = true
  501. Pillar.Anchored = true
  502. Pillar.FormFactor = "Custom"
  503. Pillar.Size = Vector3.new(5, 50, 5)
  504. Pillar.CFrame = CFrame.new(Position, Vector3.new(Player.Character.Torso.Position.x, Position.y, Player.Character.Torso.Position.z)) * CFrame.new(math.random(-1000, 1000) / 1000, -35, (math.random(-1000, 1000) / 1000)) * CFrame.fromEulerAnglesXYZ(math.rad(math.random(-2000, 2000) / 1000), math.rad(math.random(-2000, 2000) / 1000), math.rad(math.random(-2000, 2000) / 1000))
  505. tagHumanoid(Pillar)
  506. SendToServer([[local Connection = Pillar.Touched:connect(function(Hit)
  507. local Humanoid = Hit.Parent:FindFirstChild("Humanoid") or Hit.Parent.Parent:FindFirstChild("Humanoid")
  508. if Humanoid ~= nil then
  509. Humanoid.Sit = true
  510. Pillar.creator:Clone().Parent = Humanoid
  511. Humanoid:TakeDamage(3)
  512. coroutine.wrap(function() wait(0.1) creator:Remove() end)()
  513. pcall(function() Hit = Hit.Parent.Torso end)
  514. end
  515. if Hit:GetMass() < 5000 and Hit.Anchored == false then
  516. if Humanoid == nil then
  517. Hit:BreakJoints()
  518. end
  519. Hit.Velocity = ((Pillar.CFrame * CFrame.new(0, 25, 0)).p - (Pillar.CFrame * CFrame.new(0, -10, 0)).p).unit * 100
  520. end
  521. end)
  522. Pillar.CanCollide = false
  523. Pillar.Anchored = false
  524. local Position = Pillar.CFrame
  525. for i = 0, 1, 0.03 do
  526. Position = Position * CFrame.new(0, 2.75 * (1 - i), 0)
  527. Pillar.CFrame = Position
  528. Pillar.Velocity = Vector3.new()
  529. Pillar.RotVelocity = Vector3.new()
  530. wait()
  531. end
  532. Pillar.CanCollide = true
  533. Pillar.Anchored = true
  534. Pillar.CFrame = Position
  535. Pillar.Velocity = Vector3.new()
  536. Pillar.RotVelocity = Vector3.new()
  537. Connection:disconnect()
  538. wait(math.random(20, 30))
  539. for i = 1, 0, -0.05 do
  540. Pillar.CFrame = Pillar.CFrame * CFrame.new(0, -5 * (1 - i), 0)
  541. wait()
  542. end
  543. Pillar:Remove()]], "Pillar Damage", {"Pillar", Pillar})
  544. end
  545. SetSpeed(1, 0.275, Player.Character)
  546. SetAngle(1, math.rad(160), Player.Character)
  547. SetSpeed(2, 0.275, Player.Character)
  548. SetAngle(2, math.rad(160), Player.Character)
  549. for i = 0, 1, 0.075 do
  550. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-130 + (90 * i)), 0, math.rad(180)) end)
  551. wait()
  552. end
  553. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-40), 0, math.rad(180)) end)
  554. wait(0.5)
  555. SetSpeed(1, 0.25, Player.Character)
  556. SetAngle(1, 0, Player.Character)
  557. SetSpeed(2, 0.25, Player.Character)
  558. SetAngle(2, 0, Player.Character)
  559. for i = 0, 1, 0.1 do
  560. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-40 - (50 * i)), 0, math.rad(180)) end)
  561. wait()
  562. end
  563. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-90), 0, math.rad(180)) end)
  564. CanUse = true
  565. elseif Key == "t" then
  566. if Mana < 15 then return end
  567. CanUse = false
  568. SetSpeed(1, 0.03, Player.Character)
  569. SetAngle(1, math.rad(-40), Player.Character)
  570. SetSpeed(2, 0.03, Player.Character)
  571. SetAngle(2, math.rad(-40), Player.Character)
  572. for i = 0, 1, 0.06 do
  573. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-90 - (40 * i)), 0, math.rad(180)) end)
  574. wait()
  575. end
  576. local Hit, Position = Workspace:FindPartOnRay(Ray.new(Player.Character.Torso.Position, Vector3.new(0, -4, 0)), Player.Character)
  577. if Hit ~= nil and Position ~= nil then
  578. Mana = Mana - 15
  579. SoundToServer("Fire", "http://www.roblox.com/Asset/?id=10209268", 2, 1, false, Player.Character.Torso)
  580. local Pillar = Instance.new("Part", Workspace)
  581. Pillar.Name = "Pillar"
  582. Pillar.TopSurface = 0
  583. Pillar.BottomSurface = 0
  584. Pillar.BrickColor = BrickColor.new("Pastel brown")
  585. Pillar.Material = "Concrete"
  586. Pillar.Locked = true
  587. Pillar.Anchored = true
  588. Pillar.FormFactor = "Custom"
  589. Pillar.Size = Vector3.new(2.5, 25, 2.5)
  590. Pillar.CFrame = CFrame.new(Position) * CFrame.new(0, -20, 0) * CFrame.fromEulerAnglesXYZ(Player.Character.Torso.CFrame:toEulerAnglesXYZ())
  591. SendToServer([[for i = 0, 1, 0.05 do
  592. Pillar.CFrame = Pillar.CFrame * CFrame.new(0, 2.5 * (1 - i), 0)
  593. local Velocity = Torso.Velocity + Vector3.new(0, 20 * (1 - i), 0)
  594. for i = 1, 50 do
  595. Torso.Velocity = Velocity
  596. end
  597. wait()
  598. end
  599. wait(math.random(60, 120))
  600. for i = 1, 0, -0.1 do
  601. Pillar.CFrame = Pillar.CFrame * CFrame.new(0, -5 * (1 - i), 0)
  602. wait()
  603. end
  604. Pillar:Remove()]], "Pillar Jump", {"Pillar", Pillar, "Torso", Player.Character.Torso})
  605. end
  606. SetSpeed(1, 0.3, Player.Character)
  607. SetAngle(1, math.rad(160), Player.Character)
  608. SetSpeed(2, 0.3, Player.Character)
  609. SetAngle(2, math.rad(160), Player.Character)
  610. for i = 0, 1, 0.09 do
  611. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-130 + (90 * i)), 0, math.rad(180)) end)
  612. wait()
  613. end
  614. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-40), 0, math.rad(180)) end)
  615. wait(0.25)
  616. SetSpeed(1, 0.25, Player.Character)
  617. SetAngle(1, 0, Player.Character)
  618. SetSpeed(2, 0.25, Player.Character)
  619. SetAngle(2, 0, Player.Character)
  620. for i = 0, 1, 0.1 do
  621. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-40 - (50 * i)), 0, math.rad(180)) end)
  622. wait()
  623. end
  624. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-90), 0, math.rad(180)) end)
  625. CanUse = true
  626. elseif Key == "y" then
  627. if Mana < 50 then return end
  628. CanUse = false
  629. Mana = Mana - 50
  630. SetSpeed(1, 0.1, Player.Character)
  631. SetAngle(1, math.rad(220), Player.Character)
  632. SetSpeed(2, 0.1, Player.Character)
  633. SetAngle(2, math.rad(220), Player.Character)
  634. SoundToServer("Charge", "http://www.roblox.com/Asset/?id=1369158", 1, 1, false, Player.Character.Torso)
  635. for i = 0, 1, 0.025 do
  636. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-90 + (40 * i)), 0, math.rad(180)) end)
  637. wait()
  638. end
  639. coroutine.wrap(function()
  640. local OldPosition = Player.Character.Torso.CFrame
  641. for i = 1, 50 do
  642. local Hit, Position = Workspace:FindPartOnRay(Ray.new((OldPosition * CFrame.new(0, 0, -8 - (i * 2))).p, Vector3.new(0, -50, 0)), Player.Character)
  643. if Hit ~= nil and Position ~= nil then
  644. local Pillar = Instance.new("Part", Workspace)
  645. Pillar.Name = "Pillar"
  646. Pillar.TopSurface = 0
  647. Pillar.BottomSurface = 0
  648. Pillar.BrickColor = BrickColor.new("Pastel brown")
  649. Pillar.Material = "Concrete"
  650. Pillar.Locked = true
  651. Pillar.Anchored = true
  652. Pillar.FormFactor = "Custom"
  653. Pillar.Size = Vector3.new(2, 5.5, 2)
  654. Pillar.CFrame = CFrame.new(Position) * CFrame.fromEulerAnglesXYZ(OldPosition:toEulerAnglesXYZ()) * CFrame.fromEulerAnglesXYZ(math.rad(-50), 0, 0) * CFrame.new(math.random(-500, 500) / 1000, -4, (math.random(-500, 500) / 1000)) * CFrame.fromEulerAnglesXYZ(math.rad(math.random(-1000, 1000) / 1000), math.rad(math.random(-1000, 1000) / 1000), math.rad(math.random(-1000, 1000) / 1000))
  655. SoundToServer("Fire", "http://www.roblox.com/Asset/?id=10209268", 2, 1, false, Pillar)
  656. tagHumanoid(Pillar)
  657. SendToServer([[local Connection = Pillar.Touched:connect(function(Hit)
  658. local Humanoid = Hit.Parent:FindFirstChild("Humanoid") or Hit.Parent.Parent:FindFirstChild("Humanoid")
  659. if Humanoid ~= nil then
  660. Humanoid.Sit = true
  661. Pillar.creator:Clone().Parent = Humanoid
  662. Humanoid:TakeDamage(5)
  663. coroutine.wrap(function() wait(0.1) creator:Remove() end)()
  664. pcall(function() Hit = Hit.Parent.Torso end)
  665. end
  666. if Hit:GetMass() < 30 and Hit.Anchored == false then
  667. if Humanoid == nil then
  668. Hit:BreakJoints()
  669. end
  670. Hit.Velocity = ((Pillar.CFrame * CFrame.new(0, 2.5, 0)).p - (Pillar.CFrame * CFrame.new(0, -2.5, 0)).p).unit * 50
  671. end
  672. end)
  673. Pillar.CanCollide = false
  674. Pillar.Anchored = false
  675. local Position = Pillar.CFrame
  676. for i = 0, 1, 0.1 do
  677. Position = Position * CFrame.new(0, 1 - i, 0)
  678. Pillar.CFrame = Position
  679. Pillar.Velocity = Vector3.new()
  680. Pillar.RotVelocity = Vector3.new()
  681. wait()
  682. end
  683. Pillar.CanCollide = true
  684. Pillar.Anchored = true
  685. Pillar.CFrame = Position
  686. Pillar.Velocity = Vector3.new()
  687. Pillar.RotVelocity = Vector3.new()
  688. Connection:disconnect()
  689. wait(3)
  690. for i = 1, 0, -0.05 do
  691. Pillar.CFrame = Pillar.CFrame * CFrame.new(0, -0.5 * (1 - i), 0)
  692. wait()
  693. end
  694. Pillar:Remove()]], "Pillar Damage", {"Pillar", Pillar})
  695. end
  696. wait()
  697. end
  698. end)()
  699. SetSpeed(1, 0.275, Player.Character)
  700. SetAngle(1, math.rad(-40), Player.Character)
  701. SetSpeed(2, 0.275, Player.Character)
  702. SetAngle(2, math.rad(-40), Player.Character)
  703. for i = 0, 1, 0.075 do
  704. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-50 - (100 * i)), 0, math.rad(180)) end)
  705. wait()
  706. end
  707. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-180), 0, math.rad(180)) end)
  708. wait(1)
  709. SetSpeed(1, 0.05, Player.Character)
  710. SetAngle(1, 0, Player.Character)
  711. SetSpeed(2, 0.05, Player.Character)
  712. SetAngle(2, 0, Player.Character)
  713. for i = 0, 1, 0.1 do
  714. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-180 + (90 * i)), 0, math.rad(180)) end)
  715. wait()
  716. end
  717. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-90), 0, math.rad(180)) end)
  718. CanUse = true
  719. elseif Key == "u" then
  720. if Mana < 100 then return end
  721. CanUse = false
  722. Mana = Mana - 100
  723. SetSpeed(1, 0.005, Player.Character)
  724. SetAngle(1, math.rad(-40), Player.Character)
  725. SetSpeed(2, 0.005, Player.Character)
  726. SetAngle(2, math.rad(-40), Player.Character)
  727. SoundToServer("Charge", "http://www.roblox.com/Asset/?id=1369158", 0.5, 1, false, Player.Character.Torso)
  728. for i = 0, 1, 0.01 do
  729. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-90 - (40 * i)), 0, math.rad(180)) end)
  730. wait()
  731. end
  732. local Hit, Position = Workspace:FindPartOnRay(Ray.new((Player.Character.Torso.CFrame * CFrame.new(0, 0, -15)).p, Vector3.new(0, -10, 0)), Player.Character)
  733. if Hit ~= nil and Position ~= nil then
  734. local Wave = Instance.new("Part", Workspace)
  735. Wave.Name = "Wave"
  736. Wave.TopSurface = 0
  737. Wave.BottomSurface = 0
  738. Wave.BrickColor = BrickColor.new("Pastel brown")
  739. Wave.Material = "Concrete"
  740. Wave.Locked = true
  741. Wave.Anchored = true
  742. Wave.FormFactor = "Custom"
  743. Wave.Size = Vector3.new(50, 20, 20)
  744. Wave.CFrame = CFrame.new(Position) * CFrame.new(0, -10, 0) * CFrame.fromEulerAnglesXYZ(Player.Character.Torso.CFrame:toEulerAnglesXYZ())
  745. Instance.new("SpecialMesh", Wave).MeshType = "Sphere"
  746. tagHumanoid(Wave)
  747. SendToServer([[local Connection = Wave.Touched:connect(function(Hit)
  748. local Humanoid = Hit.Parent:FindFirstChild("Humanoid") or Hit.Parent.Parent:FindFirstChild("Humanoid")
  749. if Humanoid ~= nil then
  750. Humanoid.Sit = true
  751. Wave.creator:Clone().Parent = Humanoid
  752. Humanoid:TakeDamage(3)
  753. coroutine.wrap(function() wait(0.1) creator:Remove() end)()
  754. pcall(function() Hit = Hit.Parent.Torso end)
  755. end
  756. if Hit:GetMass() < 10000 and Hit.Anchored == false then
  757. if Humanoid == nil and math.random(1, 3) == 1 then
  758. Hit:BreakJoints()
  759. end
  760. Hit.Velocity = ((Wave.CFrame * CFrame.new(0, 0, -10)).p - (Wave.CFrame * CFrame.new(0, 0, 10)).p).unit * 80
  761. end
  762. end)
  763. Wave.CanCollide = false
  764. Wave.Anchored = false
  765. for i = 0, math.pi, 0.015 do
  766. _, Position = Workspace:FindPartOnRay(Ray.new((Wave.CFrame * CFrame.new(0, 11, -1)).p, Vector3.new(0, -22, 0)), Wave)
  767. if Position == nil then break end
  768. Wave.CFrame = CFrame.new(Position) * CFrame.new(0, -10 + (10 * math.sin(i)), 0) * CFrame.fromEulerAnglesXYZ(Wave.CFrame:toEulerAnglesXYZ())
  769. Wave.Velocity = Vector3.new()
  770. Wave.RotVelocity = Vector3.new()
  771. wait()
  772. end
  773. Wave:Remove()]], "Wave Damage", {"Wave", Wave})
  774. coroutine.wrap(function()
  775. while Wave.Parent ~= nil do
  776. SoundToServer("Fire", "http://www.roblox.com/Asset/?id=10209268", 0.5, 1, false, Wave)
  777. wait()
  778. end
  779. end)()
  780. end
  781. SetSpeed(1, 0.275, Player.Character)
  782. SetAngle(1, math.rad(160), Player.Character)
  783. SetSpeed(2, 0.275, Player.Character)
  784. SetAngle(2, math.rad(160), Player.Character)
  785. for i = 0, 1, 0.075 do
  786. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-130 + (90 * i)), 0, math.rad(180)) end)
  787. wait()
  788. end
  789. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-40), 0, math.rad(180)) end)
  790. wait(0.5)
  791. SetSpeed(1, 0.25, Player.Character)
  792. SetAngle(1, 0, Player.Character)
  793. SetSpeed(2, 0.25, Player.Character)
  794. SetAngle(2, 0, Player.Character)
  795. for i = 0, 1, 0.1 do
  796. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-40 - (50 * i)), 0, math.rad(180)) end)
  797. wait()
  798. end
  799. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-90), 0, math.rad(180)) end)
  800. CanUse = true
  801. elseif Key == "p" then
  802. if Mana < 30 then return end
  803. CanUse = false
  804. Mana = Mana - 30
  805. SetSpeed(1, 0.06, Player.Character)
  806. SetAngle(1, math.rad(90), Player.Character)
  807. SetSpeed(2, 0.06, Player.Character)
  808. SetAngle(2, math.rad(90), Player.Character)
  809. for i = 0, 1, 0.03 do
  810. pcall(function()
  811. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 * (1 - i)), 0)
  812. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 * (1 - i)), 0)
  813. end)
  814. wait()
  815. end
  816. pcall(function()
  817. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.5, 0.5, 0)
  818. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0)
  819. end)
  820. local OldPosition = Player.Character.Torso.CFrame
  821. for i = math.rad(-90), math.rad(90), math.rad(12.5) do
  822. local Hit, Position = Workspace:FindPartOnRay(Ray.new(OldPosition.p, Vector3.new(0, -4, 0)), Player.Character)
  823. if Hit ~= nil and Position ~= nil then
  824. SoundToServer("Fire", "http://www.roblox.com/Asset/?id=10209268", 2, 1, false, Player.Character.Torso)
  825. local Pillar = Instance.new("Part", Workspace)
  826. Pillar.Name = "Pillar"
  827. Pillar.TopSurface = 0
  828. Pillar.BottomSurface = 0
  829. Pillar.BrickColor = BrickColor.new("Pastel brown")
  830. Pillar.Material = "Concrete"
  831. Pillar.Locked = true
  832. Pillar.Anchored = true
  833. Pillar.FormFactor = "Custom"
  834. Pillar.Size = Vector3.new(2.5, 8, 2.5)
  835. Pillar.CFrame = CFrame.new(Position) * CFrame.new(0, -5.5, 0) * CFrame.fromEulerAnglesXYZ(OldPosition:toEulerAnglesXYZ()) * CFrame.fromEulerAnglesXYZ(0, i, 0) * CFrame.new(0, 0, -10)
  836. SendToServer([[for i = 0, 1, 0.1 do
  837. Pillar.CFrame = Pillar.CFrame * CFrame.new(0, 1.7 * (1 - i), 0)
  838. wait()
  839. end
  840. wait(10)
  841. for i = 1, 0, -0.1 do
  842. Pillar.CFrame = Pillar.CFrame * CFrame.new(0, -5 * (1 - i), 0)
  843. wait()
  844. end
  845. Pillar:Remove()]], "Pillar Shield", {"Pillar", Pillar, "Torso", Player.Character.Torso})
  846. end
  847. wait(0.1)
  848. end
  849. SetSpeed(1, 0.06, Player.Character)
  850. SetAngle(1, 0, Player.Character)
  851. SetSpeed(2, 0.06, Player.Character)
  852. SetAngle(2, 0, Player.Character)
  853. for i = 1, 0, -0.03 do
  854. pcall(function()
  855. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 * (1 - i)), 0)
  856. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 * (1 - i)), 0)
  857. end)
  858. wait()
  859. end
  860. ResetLimbCFrame(1, Player.Character)
  861. ResetLimbCFrame(2, Player.Character)
  862. CanUse = true
  863. elseif Key == "f" then
  864. if Mana <= 0 then return end
  865. CanUse = false
  866. KeyFDown = true
  867. SetSpeed(1, 0.06, Player.Character)
  868. SetAngle(1, math.rad(60), Player.Character)
  869. SetSpeed(2, 0.06, Player.Character)
  870. SetAngle(2, math.rad(60), Player.Character)
  871. local Boulder = Instance.new("Part", Player.Character)
  872. Boulder.Name = "Boulder"
  873. Boulder.Locked = true
  874. Boulder.TopSurface = 0
  875. Boulder.BottomSurface = 0
  876. Boulder.BrickColor = BrickColor.new("Pastel brown")
  877. Boulder.Material = "Concrete"
  878. Boulder.FormFactor = "Custom"
  879. Boulder.Size = Vector3.new(4, 0.5, 7)
  880. Boulder.CFrame = Player.Character.Torso.CFrame * CFrame.new(0, -3, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  881. Instance.new("SpecialMesh", Boulder).MeshType = "Sphere"
  882. local Weld = Instance.new("Weld", Player.Character.Torso)
  883. Weld.Part0 = Weld.Parent
  884. Weld.Part1 = Boulder
  885. Weld.C0 = CFrame.new(0, -3, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  886. local AimGyroAdd = Instance.new("CFrameValue", Player.Character)
  887. AimGyroAdd.Name = "AimGyroAdd"
  888. pcall(function() Player.Character.Torso.Neck.MaxVelocity = 0 end)
  889. for i = 0, 1, 0.07 do
  890. pcall(function() Boulder.Mesh.Scale = Vector3.new(i, i, i) end)
  891. pcall(function()
  892. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 + (80 * i)), 0)
  893. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 - (80 * i)), 0)
  894. Player.Character.Torso.Neck.CurrentAngle = math.rad(90 * i)
  895. end)
  896. AimGyroAdd.Value = CFrame.fromEulerAnglesXYZ(0, math.rad(-90 * i), 0)
  897. wait()
  898. end
  899. pcall(function() Boulder.Mesh.Scale = Vector3.new(1, 1, 1) end)
  900. pcall(function()
  901. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-10), 0)
  902. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(10), 0)
  903. end)
  904. local BodyVelocity = Instance.new("BodyVelocity", Boulder)
  905. BodyVelocity.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  906. local BodyGyro = Instance.new("BodyGyro", Boulder)
  907. BodyGyro.P = 1000
  908. BodyGyro.D = 500
  909. BodyGyro.maxTorque = Vector3.new(math.huge, math.huge, math.huge)
  910. local i = 0
  911. local OldTick = math.huge
  912. while KeyFDown == true and Selected == true and Mana > 0 do
  913. if tick() % 1 <= OldTick then
  914. Mana = Mana - 1
  915. end
  916. OldTick = tick() % 1
  917. pcall(function() Player.Character.Humanoid.PlatformStand = true end)
  918. if (Boulder.Position - Mouse.Hit.p).magnitude <= 10 then
  919. i = i - 0.15
  920. else
  921. i = i + 0.05
  922. end
  923. if i < 0 then
  924. i = 0
  925. elseif i > 1 then
  926. i = 1
  927. end
  928. BodyGyro.cframe = CFrame.new(Boulder.Position, Mouse.Hit.p)
  929. BodyVelocity.velocity = Boulder.CFrame.lookVector * 50 * i
  930. wait()
  931. end
  932. pcall(function() Player.Character.Humanoid.PlatformStand = false end)
  933. BodyVelocity:Remove()
  934. BodyGyro:Remove()
  935. SetSpeed(1, 0.06, Player.Character)
  936. SetAngle(1, 0, Player.Character)
  937. SetSpeed(2, 0.06, Player.Character)
  938. SetAngle(2, 0, Player.Character)
  939. for i = 1, 0, -0.07 do
  940. pcall(function() Boulder.Mesh.Scale = Vector3.new(i, i, i) end)
  941. pcall(function()
  942. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 + (80 * i)), 0)
  943. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 - (80 * i)), 0)
  944. Player.Character.Torso.Neck.CurrentAngle = math.rad(90 * i)
  945. end)
  946. AimGyroAdd.Value = CFrame.fromEulerAnglesXYZ(0, math.rad(-90 * i), 0)
  947. wait()
  948. end
  949. Boulder:Remove()
  950. pcall(function() Player.Character.Torso.Neck.CurrentAngle = 0 end)
  951. AimGyroAdd:Remove()
  952. ResetLimbCFrame(1, Player.Character)
  953. ResetLimbCFrame(2, Player.Character)
  954. CanUse = true
  955. end
  956. end
  957. end
  958.  
  959.  
  960. function onKeyUp(Key, Mouse)
  961. if Selected == false then return end
  962. Key = Key:lower()
  963. if Key == "e" then
  964. KeyEDown = false
  965. elseif Key == "f" then
  966. KeyFDown = false
  967. end
  968. end
  969.  
  970.  
  971. function onSelected(Mouse)
  972. if Selected == true or CanUse == false then return end
  973. CanUse = false
  974. while true do
  975. if CheckPlayer() == true then
  976. if Player.Character.Torso:FindFirstChild("Right Shoulder") ~= nil and Player.Character.Torso:FindFirstChild("Left Shoulder") ~= nil then
  977. break
  978. end
  979. end
  980. wait(0.1)
  981. end
  982. Selected = true
  983. DisableLimb(1, Player.Character)
  984. SetSpeed(1, 0.5, Player.Character)
  985. SetAngle(1, 0, Player.Character)
  986. DisableLimb(2, Player.Character)
  987. SetSpeed(2, 0.5, Player.Character)
  988. SetAngle(2, 0, Player.Character)
  989. coroutine.wrap(function()
  990. while Selected == true do
  991. script.Parent.Name = "Mana:\n" ..Mana
  992. wait()
  993. end
  994. script.Parent.Name = ModelName
  995. end)()
  996. Mouse.Icon = "rbxasset://textures\\GunCursor.png"
  997. Mouse.Button1Down:connect(function() onButton1Down(Mouse) end)
  998. Mouse.Button1Up:connect(function() onButton1Up(Mouse) end)
  999. Mouse.KeyDown:connect(function(Key) onKeyDown(Key, Mouse) end)
  1000. Mouse.KeyUp:connect(function(Key) onKeyUp(Key, Mouse) end)
  1001. CanUse = true
  1002. end
  1003.  
  1004.  
  1005. function onDeselected(Mouse)
  1006. if Selected == false then return end
  1007. Selected = false
  1008. while CanUse == false do wait() end
  1009. ResetLimbCFrame(1, Player.Character)
  1010. ResetLimbCFrame(2, Player.Character)
  1011. SetSpeed(1, 0.25, Player.Character)
  1012. SetSpeed(2, 0.25, Player.Character)
  1013. EnableLimb(1, Player.Character)
  1014. EnableLimb(2, Player.Character)
  1015. CanUse = true
  1016. end
  1017.  
  1018.  
  1019. if script.Parent.ClassName ~= "HopperBin" then
  1020. if Player == nil then print("Error: Player not found!") return end
  1021. Tool = Instance.new("HopperBin")
  1022. Tool.Name = ModelName
  1023. Tool.Parent = Player.Backpack
  1024. Instance.new("IntValue", script).Name = "Magazine"
  1025. script.Name = "Main"
  1026. script.Parent = Tool
  1027. elseif script.Parent.ClassName == "HopperBin" and Connected == false then
  1028. Connected = true
  1029. Player = script.Parent.Parent.Parent
  1030. script.Parent.Selected:connect(onSelected)
  1031. script.Parent.Deselected:connect(onDeselected)
  1032. coroutine.wrap(loadstring(MouseAim))()
  1033. end
Add Comment
Please, Sign In to add comment