Advertisement
Baldeagle22

shrimp

Sep 26th, 2018
374
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.65 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,game,owner = owner,game
  3. local RealPlayer = Player
  4. do
  5. print("FE made by SoulCah | Dennis <3")
  6. local rp = RealPlayer
  7. script.Parent = rp.Character
  8.  
  9. --RemoteEvent for communicating
  10. local Event = Instance.new("RemoteEvent")
  11. Event.Name = "UserInput_Event"
  12.  
  13. --Fake event to make stuff like Mouse.KeyDown work
  14. local function fakeEvent()
  15. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  16. t.connect = t.Connect
  17. return t
  18. end
  19.  
  20. --Creating fake input objects with fake variables
  21. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  22. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  23. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  24. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  25. end}
  26. --Merged 2 functions into one by checking amount of arguments
  27. CAS.UnbindAction = CAS.BindAction
  28.  
  29. --This function will trigger the events that have been :Connect()'ed
  30. local function te(self,ev,...)
  31. local t = m[ev]
  32. if t and t._fakeEvent then
  33. for _,f in pairs(t.Functions) do
  34. f(...)
  35. end
  36. end
  37. end
  38. m.TrigEvent = te
  39. UIS.TrigEvent = te
  40.  
  41. Event.OnServerEvent:Connect(function(plr,io)
  42. if plr~=rp then return end
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. if not io.isMouse then
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61.  
  62. -- Player declarations
  63. local player = game.Players.baldeagle22
  64. local char = player.Character
  65.  
  66. -- Body parts
  67. local torso = char.Torso
  68.  
  69. -- Tool declarations
  70. local mouseDown = false
  71. local keysDown = {}
  72.  
  73. -- Earth bending declarations
  74. local raisingEarth = false
  75. local raisingTower = false
  76. local wall = false
  77. local groundAttack = false
  78. local lastTower = nil
  79. local disabled = {}
  80. local frames = {}
  81. local parts = {}
  82. local Taunts = {"Die already!", "DIE, DIE, DIE!", "HRRAAAA!", "I told you it's useless!", "You will not be the first to die by my hand!", "You will suffer!", "Don't try to evade the inevitable!", "I will tear you apart!","You are pathetic!","You will never defeat me!","I AM GOD!"}
  83. local raisechats = {"I will make you realize the depth of my power, even if I have to grind your body into dust!","I suggest you run.", "Now you're just pissing me off.", "Hmph.", "It's useless.",".....", "Your life ends here!","Foolish!","Do you know who I am?","What stupidity.","Hmm.","Hmph. Your confidence is annoying.","You cannot kill a god."}
  84.  
  85. -- Main
  86. function main(mouse)
  87. while true do wait(1/30)
  88. local look = CFrame.new(torso.Position, torso.Position + mouse.Hit.lookVector)
  89.  
  90. -- Reset parts
  91. parts = {}
  92.  
  93. -- Get parts
  94. for x = -20, 20, 10 do
  95. for y = -20, 20, 10 do
  96. for z = -30, -10, 10 do
  97. local pos = look * Vector3.new(x, y, z)
  98. getPartsInRegion3(
  99. Region3.new(
  100. pos + Vector3.new(1,1,1)*-9,
  101. pos + Vector3.new(1,1,1)* 9
  102. ),
  103. parts
  104. )
  105. end
  106. end
  107. end
  108.  
  109. -- Mouse down
  110. if mouseDown then
  111. -- Create dif and bodies
  112. for _, part in pairs(parts) do
  113. if part.Name == "Earth" and not disabled[part] then
  114. if not frames[part] and part ~= lastTower then
  115. frames[part] = look:toObjectSpace(part.CFrame)
  116.  
  117. part:ClearAllChildren()
  118. part.Anchored = false
  119.  
  120. -- Create bodies
  121. createBody("Position", part)
  122. createBody("Gyro", part)
  123. end
  124. end
  125. end
  126.  
  127. -- Move bodies
  128. for part in pairs(frames) do
  129. local bodyPos = part:FindFirstChild("BodyPosition")
  130. local bodyGyr = part:FindFirstChild("BodyGyro")
  131.  
  132. -- Bodies exist
  133. if bodyPos and bodyGyr then
  134. local dif = look * frames[part]
  135.  
  136. bodyPos.position = dif.p
  137. bodyGyr.cframe = dif
  138. else
  139. frames[part] = nil
  140. end
  141. end
  142. else
  143. for part in pairs(frames) do
  144. if part.Name == "Earth" then
  145. frames[part] = nil
  146.  
  147. part:ClearAllChildren()
  148. end
  149. end
  150. end
  151. end
  152. end
  153.  
  154. -- On key change
  155. function onKeyChange(mouse, key, state)
  156. -- Raise earth
  157. if key == "e" and state and not raisingEarth then
  158. game:GetService("Chat"):Chat(char.Head, raisechats[math.random(1,#raisechats)], Enum.ChatColor.Red)
  159. raisingEarth = true
  160. while keysDown[key] do
  161. local torsoY = torso.Position.y + 3
  162. local pos = planeY(torso.Position, 0.4 - 4/2)
  163. local dir = planeY(mouse.Hit.lookVector).unit
  164. local frame = CFrame.new(pos, pos + dir) * CFrame.new(r(-10, 10), 0, r(-20, -5))
  165.  
  166. -- Create earth part
  167. local part = createEarth(workspace)
  168. part.Anchored = true
  169. part.Size = Vector3.new(4, 4, 4)
  170. disabled[part] = true
  171.  
  172. -- Raise earth
  173. for i = 1, 4 do i = i/4
  174. part.CFrame = frame * CFrame.new(0, (torsoY - frame.y)*i, 0)
  175. wait(1/10000000)
  176. if not part.Anchored then
  177. break
  178. end
  179. end
  180.  
  181. disabled[part] = nil
  182. part.Anchored = false
  183.  
  184. wait(1/100)
  185. end
  186. raisingEarth = false
  187.  
  188.  
  189.  
  190.  
  191.  
  192. elseif key == "c" and state and not raisingEarth then
  193. game:GetService("Chat"):Chat(char.Head, raisechats[math.random(1,#raisechats)], Enum.ChatColor.Red)
  194. raisingEarth = true
  195. while keysDown[key] do
  196. local torsoY = torso.Position.y + 3
  197. local pos = planeY(torso.Position, 0.4 - 4/2)
  198. local dir = planeY(mouse.Hit.lookVector).unit
  199. local frame = CFrame.new(pos, pos + dir) * CFrame.new(r(-10, 10), 0, r(-20, -5))
  200.  
  201. -- Create earth part
  202. local part = createEarth(workspace)
  203. part.Anchored = true
  204. part.Size = Vector3.new(2, 2, 2)
  205. disabled[part] = true
  206.  
  207. -- Raise earth
  208. for i = 1, 4 do i = i/4
  209. part.CFrame = frame * CFrame.new(0, (torsoY - frame.y)*i, 0)
  210. wait(1/10000000)
  211. if not part.Anchored then
  212. break
  213. end
  214. end
  215.  
  216. disabled[part] = nil
  217. part.Anchored = false
  218.  
  219. wait(1/100)
  220. end
  221. raisingEarth = false
  222.  
  223.  
  224.  
  225. -- Push earth
  226. elseif key == "f" and state then
  227. game:GetService("Chat"):Chat(char.Head, Taunts[math.random(1,#Taunts)], Enum.ChatColor.Red)
  228. for _, part in pairs(parts) do
  229. if part.Name == "Earth" and part ~= lastTower then
  230. part:ClearAllChildren()
  231. part.Anchored = false
  232.  
  233. -- Add force
  234. local bodyForce = createBody("Force", part)
  235. bodyForce.force = mouse.Hit.lookVector*1.5e4 * part:GetMass()
  236.  
  237. game.Debris:AddItem(bodyForce, 1/30)
  238.  
  239. -- Disable part
  240. disabled[part] = true
  241. delay(1, function()
  242. disabled[part] = nil
  243. end)
  244. end
  245. end
  246.  
  247. -- Monster Ability
  248. elseif key == "m" and state then
  249. wait(.1)
  250. f = Instance.new("Fire")
  251. f.Parent = char.Head
  252. f.Color = Color3.new(0.7,0.5,0.9)
  253. f.Size = 5
  254. f.Heat = 5
  255. wait(.1)
  256. g = Instance.new("Fire")
  257. g.Parent = char["Right Arm"]
  258. g.Color = Color3.new(0.7,0.5,0.9)
  259. g.Size = 5
  260. g.Heat = 5
  261. wait(.1)
  262. h = Instance.new("Fire")
  263. h.Parent = char["Left Arm"]
  264. h.Color = Color3.new(0.7,0.5,0.9)
  265. h.Size = 5
  266. h.Heat = 5
  267. wait(.1)
  268. z = Instance.new("Sound")
  269. z.Parent = game.Workspace
  270. z.SoundId = "http://www.roblox.com/asset/?id=159365911"
  271. z.Looped = false
  272. z.Volume = 1
  273. z.Pitch = 0.65
  274. wait(1.8)
  275. game:GetService("Chat"):Chat(char.Head, "Hmph.", Enum.ChatColor.Red)
  276. wait(3.4)
  277. game:GetService("Chat"):Chat(char.Head, "This has become a pointless battle.", Enum.ChatColor.Red)
  278. wait(2.4)
  279. game:GetService("Chat"):Chat(char.Head, "I will end this quickly", Enum.ChatColor.Red)
  280. wait(.1)
  281. z:Play()
  282. char.Humanoid.MaxHealth = 900000000
  283. wait(1)
  284. char.Humanoid.Health = 900000000
  285. wait(182)
  286. char.Humanoid.MaxHealth = 600
  287. z:Remove()
  288. f:Remove()
  289. g:Remove()
  290. h:Remove()
  291.  
  292. -- N-Rage
  293. elseif key == "n" and state then
  294. c = Instance.new("Sound")
  295. c.Parent = game.Workspace
  296. c.SoundId = "http://www.roblox.com/asset/?id=157747165"
  297. c.Looped = false
  298. c.Volume = 1
  299. c.Pitch = .7
  300. wait(1.8)
  301. game:GetService("Chat"):Chat(char.Head, "What the hell was that?", Enum.ChatColor.Red)
  302. wait(2)
  303. game:GetService("Chat"):Chat(char.Head, "Did you actually believe you could harm me?", Enum.ChatColor.Red)
  304. wait(2.4)
  305. game:GetService("Chat"):Chat(char.Head, "If you would simply let yourself die, you would not have to go through this pointless suffering.", Enum.ChatColor.Red)
  306. wait(3.5)
  307. game:GetService("Chat"):Chat(char.Head, "All you have done is waste my time.", Enum.ChatColor.Red)
  308. wait(.1)
  309. c:Play()
  310. char.Humanoid.MaxHealth = math.huge
  311. wait(160)
  312. char.Humanoid.MaxHealth = 10000
  313. c:Remove()
  314.  
  315. -- Break earth
  316. elseif key == "b" and state then
  317. game:GetService("Chat"):Char(char.Head, "Hmph.", Enum.ChatColor.Red)
  318. wait(.01)
  319. for part in pairs(frames) do
  320. if part.Size == Vector3.new(4, 4, 4) then
  321. for x = -1, 2, 2 do
  322. for y = -1, 2, 2 do
  323. for z = -1, 1, 2 do
  324. local oPart = createEarth(workspace)
  325. oPart.Size = Vector3.new(2, 2, 2)
  326. oPart.CFrame = part.CFrame * CFrame.new(x*1.1, y*1.1, z*1.1)
  327. end
  328. end
  329. end
  330. part:Destroy()
  331. end
  332.  
  333. end
  334.  
  335. for part in pairs(frames) do
  336. if part.Size == Vector3.new(25, 15, 25) then
  337. for x = -3, 2, 2 do
  338. for y = -3, 2, 2 do
  339. for z = -3, 1, 2 do
  340. local oPart = createEarth(workspace)
  341. oPart.Size = Vector3.new(2, 2, 2)
  342. oPart.CFrame = part.CFrame * CFrame.new(x*1.1, y*1.1, z*1.1)
  343. end
  344. end
  345. end
  346. part:Destroy()
  347. end
  348.  
  349. end
  350.  
  351. for part in pairs(frames) do
  352. if part.Size == Vector3.new(2, 2, 2) then
  353. for x = -0.5, 2, 2 do
  354. for y = -0.5, 2, 2 do
  355. for z = -0.5, 1, 2 do
  356. local oPart = createEarth(workspace)
  357. oPart.Size = Vector3.new(1, 1, 1)
  358. oPart.CFrame = part.CFrame * CFrame.new(x*1.1, y*1.1, z*1.1)
  359. end
  360. end
  361. end
  362. part:Destroy()
  363. end
  364.  
  365. end
  366.  
  367.  
  368.  
  369.  
  370. -- Raise tower
  371. elseif key == "r" and state and not raisingTower then
  372. game:GetService("Chat"):Chat(char.Head, raisechats[math.random(1,#raisechats)], Enum.ChatColor.Red)
  373. raisingTower = true
  374. lastTower = nil
  375. if torso.Position.y - 5/2 < 20.4 then
  376. local part = createEarth(workspace)
  377. part.Anchored = true
  378. disabled[part] = true
  379.  
  380. for i = 0, 20, 4 do
  381. part.Size = Vector3.new(5, i, 5)
  382. part.CFrame = CFrame.new(torso.Position.x, 0.4 + part.Size.y/2, torso.Position.z)
  383. torso.CFrame = (torso.CFrame - torso.CFrame.p) + Vector3.new(torso.Position.x, part.Position.y + part.Size.y/2 + 5/2, torso.Position.z)
  384. wait(1/30)
  385. end
  386.  
  387. lastTower = part
  388.  
  389. disabled[part] = nil
  390. part.Anchored = false
  391. end
  392. raisingTower = false
  393.  
  394.  
  395. -- Raise wall
  396. elseif key == "t" and state and not wall then
  397. game:GetService("Chat"):Chat(char.Head, raisechats[math.random(1,#raisechats)], Enum.ChatColor.Red)
  398. wall = true
  399. lastWall = nil
  400. if torso.Position.y - 5/2 < 20.4 then
  401. local part = createEarth(workspace)
  402. part.Anchored = true
  403. disabled[part] = true
  404.  
  405. for i = 0, 1, 20 do
  406. part.Size = Vector3.new(25, 15, 25)
  407. part.CFrame = CFrame.new(torso.Position.x, 0.4 + part.Size.y/2, torso.Position.z)
  408. torso.CFrame = (torso.CFrame - torso.CFrame.p) + Vector3.new(torso.Position.x, part.Position.y + part.Size.y/2 + 5/2, torso.Position.z)
  409. wait(1/30)
  410. end
  411.  
  412. lastWall = part
  413.  
  414. disabled[part] = nil
  415. part.Anchored = false
  416. end
  417. wall = false
  418.  
  419. -- Ground attack
  420. elseif key == "g" and state and not groundAttack then
  421. game:GetService("Chat"):Chat(char.Head, Taunts[math.random(1,#Taunts)], Enum.ChatColor.Red)
  422. groundAttack = true
  423. delay(1, function()
  424. groundAttack = false
  425. end)
  426.  
  427. local dir = planeY(mouse.Hit.p - torso.Position).unit
  428. local pos = planeY(torso.Position, 0.4 + 1) + dir*5
  429.  
  430. local ground = {}
  431.  
  432. delay(5, function()
  433. for i = 1, 20 do
  434. for _, part in pairs(ground) do
  435. if part.Anchored then
  436. part.CFrame = part.CFrame + Vector3.new(0, -1/7, 0)
  437. end
  438. end
  439. wait(1/30)
  440. end
  441. for _, part in pairs(ground) do
  442. if part.Anchored then
  443. part:Destroy()
  444. end
  445. end
  446. end)
  447.  
  448. for i = 1, 10 do
  449. local hit, pos2 = rayCast(pos, dir*5, {char})
  450.  
  451. local part = createEarth(workspace)
  452. part.Anchored = true
  453. part.Size = Vector3.new(4, 4, 4)
  454. part.CFrame = CFrame.new(pos2, pos2 + dir) * CFrame.Angles(math.rad(-50), 0, 0) + Vector3.new(0, -0, 0)
  455.  
  456. ground[#ground + 1] = part
  457.  
  458. -- Add force
  459. if hit then
  460. local mass = hit:GetMass()
  461.  
  462. -- Hit player
  463. for _, oPlayer in pairs(game.Players:GetPlayers()) do
  464. if oPlayer.Character and oPlayer.Character:FindFirstChild("Torso") and hit:IsDescendantOf(oPlayer.Character) then
  465. hit = oPlayer.Character.Torso
  466. mass = 20
  467. end
  468. end
  469.  
  470. if hit.Name ~= "Torso" then
  471. hit:ClearAllChildren()
  472. end
  473. hit.Anchored = false
  474.  
  475. -- Add force
  476. local bodyForce = createBody("Force", hit)
  477. bodyForce.force = (dir + Vector3.new(0, 0.2, 0)).unit*1e4 * mass
  478.  
  479. game.Debris:AddItem(bodyForce, 1/30)
  480. break
  481. end
  482.  
  483. pos = pos2
  484. wait(1/20)
  485. end
  486. end
  487. end
  488.  
  489. --- CORE CODE BELOW --- CORE CODE BELOW --- CORE CODE BELOW ---
  490. --- CORE CODE BELOW --- CORE CODE BELOW --- CORE CODE BELOW ---
  491. --- CORE CODE BELOW --- CORE CODE BELOW --- CORE CODE BELOW ---
  492.  
  493. -- Clear old tool
  494. player.Backpack:ClearAllChildren()
  495.  
  496. -- Create tool
  497. local tool = Instance.new("HopperBin")
  498. tool.Parent = player.Backpack
  499. tool.Name = "Baldeagle22's Custom"
  500.  
  501. -- Tool selected
  502. tool.Selected:connect(function(mouse)
  503. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  504.  
  505. -- Mouse events
  506. mouse.Button1Down:connect(function()
  507. mouseDown = true
  508. end)
  509. mouse.Button1Up:connect(function()
  510. mouseDown = false
  511. end)
  512. mouse.KeyDown:connect(function(key)
  513. keysDown[key:lower()] = true
  514. onKeyChange(mouse, key:lower(), true)
  515. end)
  516. mouse.KeyUp:connect(function(key)
  517. keysDown[key:lower()] = false
  518. onKeyChange(mouse, key:lower(), false)
  519. end)
  520.  
  521. -- Call main
  522. main(mouse)
  523. end)
  524.  
  525. --- LIBRARY BELOW --- LIBRARY BELOW --- LIBRARY BELOW ---
  526. --- LIBRARY BELOW --- LIBRARY BELOW --- LIBRARY BELOW ---
  527. --- LIBRARY BELOW --- LIBRARY BELOW --- LIBRARY BELOW ---
  528.  
  529. -- Ray cast
  530. function rayCast(pos, dir, ignore)
  531. return workspace:FindPartOnRayWithIgnoreList(Ray.new(pos, dir), ignore)
  532. end
  533.  
  534. -- Create body
  535. function createBody(type, path)
  536. local body = Instance.new("Body" .. type)
  537. if type == "Gyro" then
  538. body.maxTorque = Vector3.new(math.huge, math.huge, math.huge)
  539. elseif type ~= "Force" then
  540. body.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  541. end
  542. body.Parent = path
  543. return body
  544. end
  545.  
  546. -- Get parts in region 3
  547. function getPartsInRegion3(region, parts)
  548. repeat
  549. local regParts = workspace:FindPartsInRegion3WithIgnoreList(region, parts, 100)
  550. for i, part in pairs(regParts) do
  551. parts[#parts + 1] = part
  552. end
  553. until #regParts < 100
  554. end
  555.  
  556. -- Random
  557. function r(min, max)
  558. return math.random()*(max - min) + min
  559. end
  560.  
  561. -- Plane y
  562. function planeY(v, y)
  563. return Vector3.new(v.x, y or 0, v.z)
  564. end
  565.  
  566. -- Create earth
  567. function createEarth(path)
  568. local part = createPart("Earth", path)
  569. part.BrickColor = BrickColor.new("Really black")
  570. part.Material = "Slate"
  571. m = Instance.new("Fire",part)
  572. m.Heat = 10
  573. part.Parent = path
  574. return part
  575. end
  576.  
  577. -- Create part
  578. function createPart(name, path)
  579. local part = Instance.new("Part")
  580. part.FormFactor = "Symmetric"
  581. part.BottomSurface = "Smooth"
  582. part.TopSurface = "Smooth"
  583. part.Size = Vector3.new(1, 1, 1)
  584. part.Name = name
  585. part.Parent = path
  586. return part
  587. end
  588. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement