Advertisement
EARTHWORM_SALLY

Untitled

Jul 27th, 2019
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2.  
  3. local Player,game,owner = owner,game
  4.  
  5. local RealPlayer = Player
  6.  
  7. do
  8. print("FE Compatibility code by Mokiros")
  9. local rp = RealPlayer
  10. script.Parent = rp.Character
  11.  
  12. --RemoteEvent for communicating
  13. local Event = Instance.new("RemoteEvent")
  14. Event.Name = "UserInput_Event"
  15.  
  16. --Fake event to make stuff like Mouse.KeyDown work
  17. local function fakeEvent()
  18. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  19. t.connect = t.Connect
  20. return t
  21. end
  22.  
  23. --Creating fake input objects with fake variables
  24. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  25. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  26. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  27. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  28. end}
  29. --Merged 2 functions into one by checking amount of arguments
  30. CAS.UnbindAction = CAS.BindAction
  31.  
  32. --This function will trigger the events that have been :Connect()'ed
  33. local function te(self,ev,...)
  34. local t = m[ev]
  35. if t and t._fakeEvent then
  36. for _,f in pairs(t.Functions) do
  37. f(...)
  38. end
  39. end
  40. end
  41. m.TrigEvent = te
  42. UIS.TrigEvent = te
  43.  
  44. Event.OnServerEvent:Connect(function(plr,io)
  45. if plr~=rp then return end
  46. m.Target = io.Target
  47. m.Hit = io.Hit
  48. if not io.isMouse then
  49. local b = io.UserInputState == Enum.UserInputState.Begin
  50. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  51. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  52. end
  53. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  54. return m:TrigEvent(b and "Button2Down" or "Button2Up")
  55. end
  56. for _,t in pairs(CAS.Actions) do
  57. for _,k in pairs(t.Keys) do
  58. if k==io.KeyCode then
  59. t.Function(t.Name,io.UserInputState,io)
  60. end
  61. end
  62. end
  63. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  64. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  65. end
  66. end)
  67. Event.Parent = NLS([==[
  68. local Player = game:GetService("Players").LocalPlayer
  69. local Event = script:WaitForChild("UserInput_Event")
  70. local Mouse = Player:GetMouse()
  71. local UIS = game:GetService("UserInputService")
  72. local input = function(io,a)
  73. if a then return end
  74. --Since InputObject is a client-side instance, we create and pass table instead
  75. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  76. end
  77. UIS.InputBegan:Connect(input)
  78. UIS.InputEnded:Connect(input)
  79. local h,t
  80. --Give the server mouse data 30 times every second, but only if the values changed
  81. --If player is not moving their mouse, client won't fire events
  82. while wait(1/30) do
  83. if h~=Mouse.Hit or t~=Mouse.Target then
  84. h,t=Mouse.Hit,Mouse.Target
  85. Event:FireServer({isMouse=true,Target=t,Hit=h})
  86. end
  87. end]==],Player.Character)
  88.  
  89. ----Sandboxed game object that allows the usage of client-side methods and services
  90. --Real game object
  91. local _rg = game
  92.  
  93. --Metatable for fake service
  94. local fsmt = {
  95. __index = function(self,k)
  96. local s = rawget(self,"_RealService")
  97. if s then
  98. return typeof(s[k])=="function"
  99. and function(_,...)return s[k](s,...)end or s[k]
  100. end
  101. end,
  102. __newindex = function(self,k,v)
  103. local s = rawget(self,"_RealService")
  104. if s then s[k]=v end
  105. end
  106. }
  107. local function FakeService(t,RealService)
  108. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  109. return setmetatable(t,fsmt)
  110. end
  111.  
  112. --Fake game object
  113. local g = {
  114. GetService = function(self,s)
  115. return rawget(self,s) or _rg:GetService(s)
  116. end,
  117. Players = FakeService({
  118. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  119. },"Players"),
  120. UserInputService = FakeService(UIS,"UserInputService"),
  121. ContextActionService = FakeService(CAS,"ContextActionService"),
  122. RunService = FakeService({
  123. _btrs = {},
  124. RenderStepped = _rg:GetService("RunService").Heartbeat,
  125. BindToRenderStep = function(self,name,_,fun)
  126. self._btrs[name] = self.Heartbeat:Connect(fun)
  127. end,
  128. UnbindFromRenderStep = function(self,name)
  129. self._btrs[name]:Disconnect()
  130. end,
  131. },"RunService")
  132. }
  133. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  134. g.service = g.GetService
  135. FakeService(g,game)
  136. --Changing owner to fake player object to support owner:GetMouse()
  137. game,owner = g,g.Players.LocalPlayer
  138. end
  139.  
  140. print([[
  141.  
  142.  
  143. _______________________________________________
  144.  
  145.  
  146. E R R R R R R R R R . . . . . . . . . .
  147.  
  148. M A D E B Y R A M I N 9 9 9 2 3 2
  149.  
  150.  
  151. F E
  152.  
  153.  
  154. _______________________________________________
  155.  
  156.  
  157. D O N ' T L E A K ! ! ! ! ! ! ! ! ! ! ! ! !
  158.  
  159. ]])
  160. wait(.2)
  161. plr=owner
  162. chr=plr.Character
  163. Head=chr.Head
  164. Root=chr.HumanoidRootPart
  165. Torso=chr.Torso
  166. RArm=chr["Right Arm"]
  167. LArm=chr["Left Arm"]
  168. RLeg=chr["Right Leg"]
  169. LLeg=chr["Left Leg"]
  170. RJ=Root.RootJoint
  171. Neck=Torso.Neck
  172. LS=Torso["Left Shoulder"]
  173. LH=Torso["Left Hip"]
  174. RS=Torso["Right Shoulder"]
  175. RH=Torso["Right Hip"]
  176. hum=chr:FindFirstChildOfClass("Humanoid")
  177. died=false
  178. EatTime=110
  179. Siz=8
  180. BallMass=15000
  181. SSpeed=1.5
  182. Grow=8
  183. MinGrow=3.5
  184. MaxGrow=8
  185. GlV=25000
  186.  
  187. create=LoadLibrary("RbxUtility").Create
  188.  
  189. chr.Animate:Remove()
  190. hum.Animator:Remove()
  191.  
  192. function clerp(a,b,t)
  193. return a:lerp(b,t)
  194. end
  195.  
  196. local newMotor=function(name,p0,p1,c0,c1)
  197. local w=Instance.new('Motor',p0)
  198. w.Name=name
  199. w.Part0=p0
  200. w.Part1=p1
  201. w.C0=c0
  202. w.C1=c1
  203. return w
  204. end
  205. for _,c in pairs(Torso:children()) do
  206. if c:IsA("Motor") and c.Name~="Neck" then
  207. c:Remove()
  208. end
  209. end
  210.  
  211.  
  212. RJ.C0,RJ.C1=CFrame.new(0,0,0),CFrame.new(0,0,0)
  213. Neck.C0,Neck.C1=CFrame.new(0,1.5,0),CFrame.new(0,0,0)
  214. --[[RS.C0,RS.C1=CFrame.new(1.5,0,0),CFrame.new(0,0,0)
  215. LS.C0,LS.C1=CFrame.new(-1.5,0,0),CFrame.new(0,0,0)
  216. RH.C0,RH.C1=CFrame.new(.5,-2,0),CFrame.new(0,0,0)
  217. LH.C0,LH.C1=CFrame.new(-.5,-2,0),CFrame.new(0,0,0)]]
  218. local RS=newMotor("Right Shoulder",Torso, RArm, CFrame.new(1.5, 0, 0), CFrame.new(0, 0, 0))
  219. local LS=newMotor("Left Shoulder",Torso, LArm, CFrame.new(-1.5, 0, 0), CFrame.new(0, 0, 0))
  220. local RH=newMotor("Right Hip",Torso, RLeg, CFrame.new(.5, -2, 0), CFrame.new(0, 0, 0))
  221. local LH=newMotor("Left Hip",Torso, LLeg, CFrame.new(-.5, -2, 0), CFrame.new(0, 0, 0))
  222.  
  223. function NoOutline(Part)
  224. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface=10,10,10,10,10,10
  225. end
  226.  
  227. function rayCast(Position,Direction,Range,Ignore)
  228. return game:service("Workspace"):FindPartOnRay(Ray.new(Position,Direction.unit*(Range or 999.999)),Ignore)
  229. end
  230.  
  231. ArtificialHB=create("BindableEvent"){
  232. Parent=script,
  233. Name="Heartbeat"}
  234.  
  235. script:WaitForChild("Heartbeat")
  236.  
  237. frame=0.0166666666666666667
  238. tf=0
  239. allowframeloss=false
  240. tossremainder=false
  241. lastframe=tick()
  242. script.Heartbeat:Fire()
  243.  
  244. game:GetService("RunService").Heartbeat:connect(function(s,p)
  245. tf=tf+s
  246. if tf >=frame then
  247. if allowframeloss then
  248. script.Heartbeat:Fire()
  249. lastframe=tick()
  250. else
  251. for i=1,math.floor(tf/frame) do
  252. script.Heartbeat:Fire()
  253. end
  254. lastframe=tick()
  255. end
  256. if tossremainder then
  257. tf=0
  258. else
  259. tf=tf-frame*math.floor(tf/frame)
  260. end
  261. end
  262. end)
  263.  
  264. function swait(num)
  265. if num==0 or num==nil then
  266. ArtificialHB.Event:wait()
  267. else
  268. for i=0,num do
  269. ArtificialHB.Event:wait()
  270. end
  271. end
  272. end
  273.  
  274. function parts(Par,name,size,color,mat,ref,tra)
  275. local part=create("Part"){
  276. Parent=Par,
  277. Name=name,
  278. Size=size,
  279. CanCollide=false,
  280. Anchored=false,
  281. BrickColor=BrickColor.new(color),
  282. Material=mat,
  283. Reflectance=ref,
  284. Transparency=tra}
  285. --Position=Torso.Position}
  286. NoOutline(part)
  287. part:BreakJoints()
  288. return part
  289. end
  290.  
  291. function meshs(Par,name,scale,mtype,id)
  292. local mesh=create("SpecialMesh"){
  293. Parent=Par,
  294. Name=name,
  295. Scale=scale,
  296. MeshType=mtype}
  297. if id~="" then
  298. mesh.MeshId="rbxassetid://"..id
  299. end
  300. return mesh
  301. end
  302.  
  303. function welds(Par,name,p0,p1,c0,c1)
  304. local weld=create("Weld"){
  305. Parent=Par,
  306. Name=name,
  307. Part0=p0,
  308. Part1=p1,
  309. C0=c0,
  310. C1=c1}
  311. return weld
  312. end
  313.  
  314. function sounds(Par,id,vol,pit)
  315. local sound=create("Sound"){
  316. Parent=Par,
  317. SoundId="rbxassetid://"..id,
  318. Volume=vol,
  319. PlaybackSpeed=pit,
  320. MaxDistance=66666666}
  321. sound:Play()
  322. game:GetService("Debris"):AddItem(sound,10)
  323. return sound
  324. end
  325.  
  326. for _,v in pairs(chr:children()) do
  327. if v:IsA("BasePart")then
  328. v.Transparency=1
  329. elseif v:IsA("Accessory")then
  330. v.Handle.Transparency=1
  331. end
  332. end
  333.  
  334. if Head:findFirstChild("face").Parent~=nil then
  335. Head:findFirstChild("face").Transparency=1
  336. end
  337.  
  338. Infections={}
  339.  
  340. --extremely lazy to use parts()
  341. i=create("Part"){
  342. Parent=chr,
  343. Color=Color3.new(math.random(0,1),math.random(0, 1),math.random(0, 1)),
  344. Locked=true,
  345. CFrame=Root.CFrame,
  346. Shape=0,
  347. Size=Vector3.new(8,8,8),
  348. Transparency=0.3,
  349. }
  350. NoOutline(i)
  351.  
  352. Force=create("BodyForce"){
  353. Parent=i}
  354.  
  355. Vepz=create("BodyVelocity"){
  356. maxForce=Vector3.new(math.huge,0,math.huge),
  357. P=10,
  358. velocity=Vector3.new(0,0,0)}
  359.  
  360. Hin=create("Hint"){
  361. Parent=workspace,
  362. Text="Survive and kill the bawlz for win!"
  363. }
  364.  
  365.  
  366. iw=welds(i,"MainWeld",Root,i,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1))
  367.  
  368.  
  369. sounds(chr,"2767085",1,1.5)
  370.  
  371.  
  372. MainGui=create("ScreenGui"){
  373. Name="RUNGui",
  374. Parent=plr.PlayerGui,
  375. DisplayOrder=5
  376. }
  377.  
  378. SizeLabel=create("TextLabel"){
  379. Parent=MainGui,
  380. AnchorPoint=Vector2.new(.5,.5),
  381. Position=UDim2.new(.5,0,.8,0),
  382. Size=UDim2.new(.06,0,.08,0),
  383. ZIndex=1,
  384. Text="Bawlz Size:",
  385. BackgroundColor3=BrickColor.new("Navy blue").Color,
  386. TextColor3=i.BrickColor.Color,
  387. BorderColor3=i.BrickColor.Color,
  388. Font="SourceSans",
  389. TextSize=18,
  390. --TextScaled=true,
  391. TextYAlignment="Top"
  392. }
  393.  
  394. SizeN=create("TextLabel"){
  395. Parent=SizeLabel,
  396. AnchorPoint=Vector2.new(.5,.5),
  397. Position=UDim2.new(.5,0,.5,0),
  398. Size=UDim2.new(1,0,1,0),
  399. ZIndex=2,
  400. Text=Grow,
  401. BackgroundTransparency=1,
  402. TextColor3=i.BrickColor.Color,
  403. Font="SourceSans",
  404. TextSize=18,
  405. --TextScaled=true,
  406. TextYAlignment="Bottom"
  407. }
  408.  
  409. MSizeN=create("TextLabel"){
  410. Parent=SizeLabel,
  411. AnchorPoint=Vector2.new(.5,.5),
  412. Position=UDim2.new(.5,0,1,0),
  413. Size=UDim2.new(1,0,1,0),
  414. ZIndex=2,
  415. Text="Max Size: "..MaxGrow,
  416. BackgroundTransparency=1,
  417. TextColor3=i.BrickColor.Color,
  418. Font="SourceSans",
  419. TextSize=18,
  420. --TextScaled=true,
  421. TextYAlignment="Bottom"
  422. }
  423.  
  424. Infections[i]=true
  425.  
  426. local s=create("Sound"){
  427. SoundId="rbxassetid://10722059",
  428. Volume=1,
  429. Parent=Root}
  430.  
  431.  
  432. function Join(Part0, Part1)
  433. local Connector=create("Weld"){
  434. C0=Part0.CFrame:inverse(),
  435. C1=Part1.CFrame:inverse(),
  436. Part0=Part0,
  437. Part1=Part1,
  438. Parent=Part0}
  439. coroutine.resume(coroutine.create(function()
  440. while Part1.Parent~=nil do
  441. swait()
  442. Connector.Parent=Part0
  443. Connector.Part0=Part0
  444. Connector.Part1=Part1
  445. end
  446. Connector:Remove()
  447. end))
  448. return Connector
  449. end
  450.  
  451. function Eat(part,ir,s)
  452. part.CanCollide=false
  453. part.Anchored=true
  454. while (part.Position-ir.Position).magnitude>Siz/3 do
  455. part.CanCollide=false
  456. part:BreakJoints()
  457. local c={part.CFrame:components()}
  458. local v=part.Position+CFrame.new(part.Position,ir.Position).lookVector*SSpeed
  459. c[1]=v.X
  460. c[2]=v.Y
  461. c[3]=v.Z
  462. part.CFrame=CFrame.new(unpack(c))
  463. swait()
  464. end
  465. s:Play()
  466. local p=Join(ir,part)
  467. part.Anchored=false
  468. swait(EatTime)
  469. if MaxGrow<30 then
  470. MaxGrow=MaxGrow+.5
  471. else
  472. MaxGrow=30
  473. end
  474. if part.Parent~=nil then
  475. part:Remove()
  476. end
  477. end
  478.  
  479. --Hit:IsDescendantOf
  480.  
  481. i.Touched:connect(function(Hit)
  482. if not died then
  483. if Hit:GetMass()<BallMass and not Infections[Hit] and not string.match(Hit.Name,"Base") and Hit.Parent.Name~=plr.Name and Hit.Parent.Parent.Name~=plr.Name then
  484. Infections[Hit]=true
  485. Eat(Hit,i,s)
  486. end
  487. end
  488. end)
  489.  
  490. mov=false
  491. mouse.Button1Down:connect(function()
  492. if not died then
  493. mov=true
  494. coroutine.resume(coroutine.create(function()
  495. while mov do
  496. swait()
  497. if i and Force then
  498. local force=(CFrame.new(i.Position,mouse.Hit.p).lookVector*GlV)
  499. i.BodyForce.force = Vector3.new(force.x,0,force.z)
  500. else
  501. Force=create("BodyForce"){
  502. Parent=i}
  503. end
  504. end
  505. if Force then
  506. Force.force=Vector3.new(0, 0, 0)
  507. end
  508. end))
  509. end
  510. end)
  511.  
  512. mouse.Button1Up:connect(function()
  513. mov=false
  514. end)
  515.  
  516. mouse.KeyDown:connect(function(k)
  517. k=k:lower()
  518. --stop
  519. if k=="q" and Vepz.Parent==nil then
  520. Vepz.Parent=i
  521. end
  522. --jump
  523. if not died then
  524. if k=="f" then
  525. local Veps=create("BodyVelocity"){
  526. maxForce=Vector3.new(0,math.huge,0),
  527. P=10,
  528. velocity=Vector3.new(0,100,0),
  529. Parent=i}
  530. game:GetService("Debris"):AddItem(Veps,.1)
  531. end
  532. --taunt
  533. if k=="t" then
  534. sounds(Root,"13378571",1,.5)
  535. end
  536. --change size
  537. if not mov then
  538. if k=="z" then
  539. if Grow<MaxGrow then
  540. Grow=Grow+.5
  541. GlV=GlV+2500
  542. else
  543. Grow=MaxGrow
  544. end
  545. elseif k=="x" then
  546. if Grow>MinGrow then
  547. Grow=Grow-.5
  548. GlV=GlV-2500
  549. else
  550. Grow=MinGrow
  551. end
  552. end
  553. --renew
  554. if k=="r" then
  555. i:Remove()
  556. end
  557. end
  558. end
  559. end)
  560.  
  561. mouse.KeyUp:connect(function(k)
  562. k=k:lower()
  563. if k=="q" and Vepz.Parent~=nil then
  564. Vepz.Parent=nil
  565. end
  566. end)
  567.  
  568. hum.Died:connect(function()
  569. died=true
  570. workspace.CurrentCamera.CameraSubject=hum
  571. game:GetService("Debris"):AddItem(Hin,.2)
  572. sounds(chr,"15632562",1,1.2)
  573. local info=TweenInfo.new(3,Enum.EasingStyle.Bounce,Enum.EasingDirection.Out,0,false)
  574. local tween=game:GetService("TweenService"):Create(i,info,{Size=Vector3.new(18,18,18)})
  575. tween:Play()
  576. i.Anchored=true
  577. for _,v in pairs(chr:children()) do
  578. if v:IsA("BasePart")then
  579. v.Anchored=true
  580. elseif v:IsA("Accessory")then
  581. v.Handle.Anchored=true
  582. end
  583. end
  584. local Hint=create("Hint"){
  585. Parent=workspace,
  586. Text="All bawlz died!"
  587. }
  588. coroutine.resume(coroutine.create(function()
  589. swait(170)
  590. sounds(chr,"13114759",1,0.7)
  591. Hint.Text="Game over!"
  592. end))
  593. game:GetService("Debris"):AddItem(Hint,5)
  594. for si=0,1,.005 do
  595. swait()
  596. i.Transparency=si
  597. end
  598. --chr:Remove()
  599. for _,v in pairs(chr:children()) do
  600. if v.ClassName~="Sound" then
  601. v:Remove()
  602. end
  603. end
  604. end)
  605.  
  606.  
  607.  
  608. while not died do
  609. swait()
  610. if Hin.Parent==nil then
  611. Hin=create("Hint"){
  612. Parent=workspace,
  613. Text="Survive and kill the bawlz for win!"}
  614. end
  615.  
  616. if i.Parent==nil then
  617. i=create("Part"){
  618. Parent=chr,
  619. Color=Color3.new(math.random(0,1),math.random(0, 1),math.random(0, 1)),
  620. Locked=true,
  621. CFrame=Root.CFrame,
  622. Shape=0,
  623. Size=Vector3.new(8,8,8),
  624. Transparency=0.3,
  625. }
  626. NoOutline(i)
  627.  
  628. Force=create("BodyForce"){
  629. Parent=i}
  630.  
  631. Vepz=create("BodyVelocity"){
  632. maxForce=Vector3.new(math.huge,0,math.huge),
  633. P=10,
  634. velocity=Vector3.new(0,0,0)}
  635.  
  636. i.Touched:connect(function(Hit)
  637. if not died then
  638. if Hit:GetMass()<BallMass and not Infections[Hit] and not string.match(Hit.Name,"Base") and Hit.Parent.Name~=plr.Name and Hit.Parent.Parent.Name~=plr.Name then
  639. Infections[Hit]=true
  640. Eat(Hit,i,s)
  641. end
  642. end
  643. end)
  644.  
  645. end
  646. i.Size=Vector3.new(Grow,Grow,Grow)
  647. iw.Parent=i
  648. iw.Part0=Root
  649. iw.Part1=i
  650. iw.C0=CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  651. iw.C1=CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  652.  
  653. SizeN.Text=Grow
  654. MSizeN.Text="Max Size: "..MaxGrow
  655.  
  656. workspace.CurrentCamera.CameraSubject=i
  657. hum.PlatformStand=true
  658. Neck.C0=clerp(Neck.C0,CFrame.new(0,0,0),.4)
  659. RS.C0=clerp(RS.C0,CFrame.new(0,0,0),.4)
  660. LS.C0=clerp(LS.C0,CFrame.new(0,0,0),.4)
  661. RH.C0=clerp(RH.C0,CFrame.new(0,0,0),.4)
  662. LH.C0=clerp(LH.C0,CFrame.new(0,0,0),.4)
  663. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement