Advertisement
MESCRIPT

R.U.N

May 30th, 2019
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,game,owner = owner,game
  4. local RealPlayer = Player
  5. do print("FE Compatibility code V2 by Mokiros")local RealPlayer=RealPlayer;script.Parent=RealPlayer.Character;local a=function(b)b[1].f[b[2]]=nil end;local c={__index={disconnect=a,Disconnect=a}}local d={__index={Connect=function(b,e)local f=tostring(math.random(0,10000))while b.f[f]do f=tostring(math.random(0,10000))end;b.f[f]=e;return setmetatable({b,f},c)end}}d.__index.connect=d.__index.Connect;local function g()return setmetatable({f={}},d)end;local h={Hit=CFrame.new(),KeyUp=g(),KeyDown=g(),Button1Up=g(),Button1Down=g(),Button2Up=g(),Button2Down=g()}h.keyUp=h.KeyUp;h.keyDown=h.KeyDown;local i={InputBegan=g(),InputEnded=g()}local CAS={Actions={},BindAction=function(self,j,k,l,...)CAS.Actions[j]=k and{Name=j,Function=k,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function m(self,n,...)for o,e in pairs(self[n].f)do e(...)end end;h.T=m;i.T=m;local p=Instance.new("RemoteEvent")p.Name="UserInput_Event"p.OnServerEvent:Connect(function(q,r)if q~=RealPlayer then return end;h.Target=r.e;h.Hit=r.d;if not r.f then local s=r.c==Enum.UserInputState.Begin;if r.b==Enum.UserInputType.MouseButton1 then return h:T(s and"Button1Down"or"Button1Up")end;if r.b==Enum.UserInputType.MouseButton2 then return h:T(s and"Button2Down"or"Button2Up")end;for o,t in pairs(CAS.Actions)do for o,u in pairs(t.Keys)do if u==r.a then t.Function(t.Name,r.c,r)end end end;h:T(s and"KeyDown"or"KeyUp",r.a.Name:lower())i:T(s and"InputBegan"or"InputEnded",r,false)end end)p.Parent=NLS([==[local a=script:WaitForChild("UserInput_Event")local b=owner:GetMouse()local c=game:GetService("UserInputService")local d=function(e,f)if f then return end;a:FireServer({a=e.KeyCode,b=e.UserInputType,c=e.UserInputState,d=b.Hit,e=b.Target})end;c.InputBegan:Connect(d)c.InputEnded:Connect(d)local g,h;local i=game:GetService("RunService").Heartbeat;while true do if g~=b.Hit or h~=b.Target then g,h=b.Hit,b.Target;a:FireServer({f=1,Target=h,d=g})end;for j=1,2 do i:Wait()end end]==],script)local v=game;local w={__index=function(self,u)local x=rawget(self,"_RealService")if x then return typeof(x[u])=="function"and function(o,...)return x[u](x,...)end or x[u]end end,__newindex=function(self,u,y)local x=rawget(self,"_RealService")if x then x[u]=y end end}local function z(t,A)t._RealService=typeof(A)=="string"and v:GetService(A)or A;return setmetatable(t,w)end;local B={GetService=function(self,x)return rawget(self,x)or v:GetService(x)end,Players=z({LocalPlayer=z({GetMouse=function(self)return h end},Player)},"Players"),UserInputService=z(i,"UserInputService"),ContextActionService=z(CAS,"ContextActionService"),RunService=z({_btrs={},RenderStepped=v:GetService("RunService").Heartbeat,BindToRenderStep=function(self,j,o,k)self._btrs[j]=self.Heartbeat:Connect(k)end,UnbindFromRenderStep=function(self,j)self._btrs[j]:Disconnect()end},"RunService")}rawset(B.Players,"localPlayer",B.Players.LocalPlayer)B.service=B.GetService;z(B,game)game,owner=B,B.Players.LocalPlayer end
  6.  
  7. --[[Salvo_Starly[Salvy].Thingy_2018.8]]--
  8. --[[Project Name: R.U.N]]--
  9. wait(.2)
  10. plr=game.Players.LocalPlayer
  11. chr=plr.Character
  12. Head=chr.Head
  13. Root=chr.HumanoidRootPart
  14. Torso=chr.Torso
  15. RArm=chr["Right Arm"]
  16. LArm=chr["Left Arm"]
  17. RLeg=chr["Right Leg"]
  18. LLeg=chr["Left Leg"]
  19. RJ=Root.RootJoint
  20. Neck=Torso.Neck
  21. LS=Torso["Left Shoulder"]
  22. LH=Torso["Left Hip"]
  23. RS=Torso["Right Shoulder"]
  24. RH=Torso["Right Hip"]
  25. hum=chr:FindFirstChildOfClass("Humanoid")
  26. mouse=plr:GetMouse()
  27. died=false
  28. EatTime=110
  29. Siz=8
  30. BallMass=15000
  31. SSpeed=1.5
  32. Grow=8
  33. MinGrow=3.5
  34. MaxGrow=8
  35. GlV=25000
  36.  
  37. create=LoadLibrary("RbxUtility").Create
  38.  
  39. chr.Animate:Remove()
  40. hum.Animator:Remove()
  41.  
  42. function clerp(a,b,t)
  43. return a:lerp(b,t)
  44. end
  45.  
  46. local newMotor=function(name,p0,p1,c0,c1)
  47. local w=Instance.new('Motor',p0)
  48. w.Name=name
  49. w.Part0=p0
  50. w.Part1=p1
  51. w.C0=c0
  52. w.C1=c1
  53. return w
  54. end
  55. for _,c in pairs(Torso:children()) do
  56. if c:IsA("Motor") and c.Name~="Neck" then
  57. c:Remove()
  58. end
  59. end
  60.  
  61.  
  62. RJ.C0,RJ.C1=CFrame.new(0,0,0),CFrame.new(0,0,0)
  63. Neck.C0,Neck.C1=CFrame.new(0,1.5,0),CFrame.new(0,0,0)
  64. --[[RS.C0,RS.C1=CFrame.new(1.5,0,0),CFrame.new(0,0,0)
  65. LS.C0,LS.C1=CFrame.new(-1.5,0,0),CFrame.new(0,0,0)
  66. RH.C0,RH.C1=CFrame.new(.5,-2,0),CFrame.new(0,0,0)
  67. LH.C0,LH.C1=CFrame.new(-.5,-2,0),CFrame.new(0,0,0)]]
  68. local RS=newMotor("Right Shoulder",Torso, RArm, CFrame.new(1.5, 0, 0), CFrame.new(0, 0, 0))
  69. local LS=newMotor("Left Shoulder",Torso, LArm, CFrame.new(-1.5, 0, 0), CFrame.new(0, 0, 0))
  70. local RH=newMotor("Right Hip",Torso, RLeg, CFrame.new(.5, -2, 0), CFrame.new(0, 0, 0))
  71. local LH=newMotor("Left Hip",Torso, LLeg, CFrame.new(-.5, -2, 0), CFrame.new(0, 0, 0))
  72.  
  73. function NoOutline(Part)
  74. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface=10,10,10,10,10,10
  75. end
  76.  
  77. function rayCast(Position,Direction,Range,Ignore)
  78. return game:service("Workspace"):FindPartOnRay(Ray.new(Position,Direction.unit*(Range or 999.999)),Ignore)
  79. end
  80.  
  81. ArtificialHB=create("BindableEvent"){
  82. Parent=script,
  83. Name="Heartbeat"}
  84.  
  85. script:WaitForChild("Heartbeat")
  86.  
  87. frame=0.0166666666666666667
  88. tf=0
  89. allowframeloss=false
  90. tossremainder=false
  91. lastframe=tick()
  92. script.Heartbeat:Fire()
  93.  
  94. game:GetService("RunService").Heartbeat:connect(function(s,p)
  95. tf=tf+s
  96. if tf >=frame then
  97. if allowframeloss then
  98. script.Heartbeat:Fire()
  99. lastframe=tick()
  100. else
  101. for i=1,math.floor(tf/frame) do
  102. script.Heartbeat:Fire()
  103. end
  104. lastframe=tick()
  105. end
  106. if tossremainder then
  107. tf=0
  108. else
  109. tf=tf-frame*math.floor(tf/frame)
  110. end
  111. end
  112. end)
  113.  
  114. function swait(num)
  115. if num==0 or num==nil then
  116. ArtificialHB.Event:wait()
  117. else
  118. for i=0,num do
  119. ArtificialHB.Event:wait()
  120. end
  121. end
  122. end
  123.  
  124. function parts(Par,name,size,color,mat,ref,tra)
  125. local part=create("Part"){
  126. Parent=Par,
  127. Name=name,
  128. Size=size,
  129. CanCollide=false,
  130. Anchored=false,
  131. BrickColor=BrickColor.new(color),
  132. Material=mat,
  133. Reflectance=ref,
  134. Transparency=tra}
  135. --Position=Torso.Position}
  136. NoOutline(part)
  137. part:BreakJoints()
  138. return part
  139. end
  140.  
  141. function meshs(Par,name,scale,mtype,id)
  142. local mesh=create("SpecialMesh"){
  143. Parent=Par,
  144. Name=name,
  145. Scale=scale,
  146. MeshType=mtype}
  147. if id~="" then
  148. mesh.MeshId="rbxassetid://"..id
  149. end
  150. return mesh
  151. end
  152.  
  153. function welds(Par,name,p0,p1,c0,c1)
  154. local weld=create("Weld"){
  155. Parent=Par,
  156. Name=name,
  157. Part0=p0,
  158. Part1=p1,
  159. C0=c0,
  160. C1=c1}
  161. return weld
  162. end
  163.  
  164. function sounds(Par,id,vol,pit)
  165. local sound=create("Sound"){
  166. Parent=Par,
  167. SoundId="rbxassetid://"..id,
  168. Volume=vol,
  169. PlaybackSpeed=pit,
  170. MaxDistance=66666666}
  171. sound:Play()
  172. game:GetService("Debris"):AddItem(sound,10)
  173. return sound
  174. end
  175.  
  176. for _,v in pairs(chr:children()) do
  177. if v:IsA("BasePart")then
  178. v.Transparency=1
  179. elseif v:IsA("Accessory")then
  180. v.Handle.Transparency=1
  181. end
  182. end
  183.  
  184. if Head:findFirstChild("face").Parent~=nil then
  185. Head:findFirstChild("face").Transparency=1
  186. end
  187.  
  188. Infections={}
  189.  
  190. --extremely lazy to use parts()
  191. i=create("Part"){
  192. Parent=chr,
  193. Color=Color3.new(math.random(0,1),math.random(0, 1),math.random(0, 1)),
  194. Locked=true,
  195. CFrame=Root.CFrame,
  196. Shape=0,
  197. Size=Vector3.new(8,8,8),
  198. Transparency=0.3,
  199. }
  200. NoOutline(i)
  201.  
  202. Force=create("BodyForce"){
  203. Parent=i}
  204.  
  205. Vepz=create("BodyVelocity"){
  206. maxForce=Vector3.new(math.huge,0,math.huge),
  207. P=10,
  208. velocity=Vector3.new(0,0,0)}
  209.  
  210. Hin=create("Hint"){
  211. Parent=workspace,
  212. Text="Survive and kill the bawlz for win!"
  213. }
  214.  
  215.  
  216. 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))
  217.  
  218.  
  219. sounds(chr,"2767085",1,1.5)
  220.  
  221.  
  222. MainGui=create("ScreenGui"){
  223. Name="RUNGui",
  224. Parent=plr.PlayerGui,
  225. DisplayOrder=5
  226. }
  227.  
  228. SizeLabel=create("TextLabel"){
  229. Parent=MainGui,
  230. AnchorPoint=Vector2.new(.5,.5),
  231. Position=UDim2.new(.5,0,.8,0),
  232. Size=UDim2.new(.06,0,.08,0),
  233. ZIndex=1,
  234. Text="Bawlz Size:",
  235. BackgroundColor3=BrickColor.new("Navy blue").Color,
  236. TextColor3=i.BrickColor.Color,
  237. BorderColor3=i.BrickColor.Color,
  238. Font="SourceSans",
  239. TextSize=18,
  240. --TextScaled=true,
  241. TextYAlignment="Top"
  242. }
  243.  
  244. SizeN=create("TextLabel"){
  245. Parent=SizeLabel,
  246. AnchorPoint=Vector2.new(.5,.5),
  247. Position=UDim2.new(.5,0,.5,0),
  248. Size=UDim2.new(1,0,1,0),
  249. ZIndex=2,
  250. Text=Grow,
  251. BackgroundTransparency=1,
  252. TextColor3=i.BrickColor.Color,
  253. Font="SourceSans",
  254. TextSize=18,
  255. --TextScaled=true,
  256. TextYAlignment="Bottom"
  257. }
  258.  
  259. MSizeN=create("TextLabel"){
  260. Parent=SizeLabel,
  261. AnchorPoint=Vector2.new(.5,.5),
  262. Position=UDim2.new(.5,0,1,0),
  263. Size=UDim2.new(1,0,1,0),
  264. ZIndex=2,
  265. Text="Max Size: "..MaxGrow,
  266. BackgroundTransparency=1,
  267. TextColor3=i.BrickColor.Color,
  268. Font="SourceSans",
  269. TextSize=18,
  270. --TextScaled=true,
  271. TextYAlignment="Bottom"
  272. }
  273.  
  274. Infections[i]=true
  275.  
  276. local s=create("Sound"){
  277. SoundId="rbxassetid://10722059",
  278. Volume=1,
  279. Parent=Root}
  280.  
  281.  
  282. function Join(Part0, Part1)
  283. local Connector=create("Weld"){
  284. C0=Part0.CFrame:inverse(),
  285. C1=Part1.CFrame:inverse(),
  286. Part0=Part0,
  287. Part1=Part1,
  288. Parent=Part0}
  289. coroutine.resume(coroutine.create(function()
  290. while Part1.Parent~=nil do
  291. swait()
  292. Connector.Parent=Part0
  293. Connector.Part0=Part0
  294. Connector.Part1=Part1
  295. end
  296. Connector:Remove()
  297. end))
  298. return Connector
  299. end
  300.  
  301. function Eat(part,ir,s)
  302. part.CanCollide=false
  303. part.Anchored=true
  304. while (part.Position-ir.Position).magnitude>Siz/3 do
  305. part.CanCollide=false
  306. part:BreakJoints()
  307. local c={part.CFrame:components()}
  308. local v=part.Position+CFrame.new(part.Position,ir.Position).lookVector*SSpeed
  309. c[1]=v.X
  310. c[2]=v.Y
  311. c[3]=v.Z
  312. part.CFrame=CFrame.new(unpack(c))
  313. swait()
  314. end
  315. s:Play()
  316. local p=Join(ir,part)
  317. part.Anchored=false
  318. swait(EatTime)
  319. if MaxGrow<30 then
  320. MaxGrow=MaxGrow+.5
  321. else
  322. MaxGrow=30
  323. end
  324. if part.Parent~=nil then
  325. part:Remove()
  326. end
  327. end
  328.  
  329. --Hit:IsDescendantOf
  330.  
  331. i.Touched:connect(function(Hit)
  332. if not died then
  333. 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
  334. Infections[Hit]=true
  335. Eat(Hit,i,s)
  336. end
  337. end
  338. end)
  339.  
  340. mov=false
  341. mouse.Button1Down:connect(function()
  342. if not died then
  343. mov=true
  344. coroutine.resume(coroutine.create(function()
  345. while mov do
  346. swait()
  347. if i and Force then
  348. local force=(CFrame.new(i.Position,mouse.Hit.p).lookVector*GlV)
  349. i.BodyForce.force = Vector3.new(force.x,0,force.z)
  350. else
  351. Force=create("BodyForce"){
  352. Parent=i}
  353. end
  354. end
  355. if Force then
  356. Force.force=Vector3.new(0, 0, 0)
  357. end
  358. end))
  359. end
  360. end)
  361.  
  362. mouse.Button1Up:connect(function()
  363. mov=false
  364. end)
  365.  
  366. mouse.KeyDown:connect(function(k)
  367. k=k:lower()
  368. --stop
  369. if k=="q" and Vepz.Parent==nil then
  370. Vepz.Parent=i
  371. end
  372. --jump
  373. if not died then
  374. if k=="f" then
  375. local Veps=create("BodyVelocity"){
  376. maxForce=Vector3.new(0,math.huge,0),
  377. P=10,
  378. velocity=Vector3.new(0,100,0),
  379. Parent=i}
  380. game:GetService("Debris"):AddItem(Veps,.1)
  381. end
  382. --taunt
  383. if k=="t" then
  384. sounds(Root,"13378571",1,.5)
  385. end
  386. --change size
  387. if not mov then
  388. if k=="z" then
  389. if Grow<MaxGrow then
  390. Grow=Grow+.5
  391. GlV=GlV+2500
  392. else
  393. Grow=MaxGrow
  394. end
  395. elseif k=="x" then
  396. if Grow>MinGrow then
  397. Grow=Grow-.5
  398. GlV=GlV-2500
  399. else
  400. Grow=MinGrow
  401. end
  402. end
  403. --renew
  404. if k=="r" then
  405. i:Remove()
  406. end
  407. end
  408. end
  409. end)
  410.  
  411. mouse.KeyUp:connect(function(k)
  412. k=k:lower()
  413. if k=="q" and Vepz.Parent~=nil then
  414. Vepz.Parent=nil
  415. end
  416. end)
  417.  
  418. hum.Died:connect(function()
  419. died=true
  420. workspace.CurrentCamera.CameraSubject=hum
  421. game:GetService("Debris"):AddItem(Hin,.2)
  422. sounds(chr,"15632562",1,1.2)
  423. local info=TweenInfo.new(3,Enum.EasingStyle.Bounce,Enum.EasingDirection.Out,0,false)
  424. local tween=game:GetService("TweenService"):Create(i,info,{Size=Vector3.new(18,18,18)})
  425. tween:Play()
  426. i.Anchored=true
  427. for _,v in pairs(chr:children()) do
  428. if v:IsA("BasePart")then
  429. v.Anchored=true
  430. elseif v:IsA("Accessory")then
  431. v.Handle.Anchored=true
  432. end
  433. end
  434. local Hint=create("Hint"){
  435. Parent=workspace,
  436. Text="All bawlz died!"
  437. }
  438. coroutine.resume(coroutine.create(function()
  439. swait(170)
  440. sounds(chr,"13114759",1,0.7)
  441. Hint.Text="Game over!"
  442. end))
  443. game:GetService("Debris"):AddItem(Hint,5)
  444. for si=0,1,.005 do
  445. swait()
  446. i.Transparency=si
  447. end
  448. --chr:Remove()
  449. for _,v in pairs(chr:children()) do
  450. if v.ClassName~="Sound" then
  451. v:Remove()
  452. end
  453. end
  454. end)
  455.  
  456.  
  457.  
  458. while not died do
  459. swait()
  460. if Hin.Parent==nil then
  461. Hin=create("Hint"){
  462. Parent=workspace,
  463. Text="Survive and kill the bawlz for win!"}
  464. end
  465.  
  466. if i.Parent==nil then
  467. i=create("Part"){
  468. Parent=chr,
  469. Color=Color3.new(math.random(0,1),math.random(0, 1),math.random(0, 1)),
  470. Locked=true,
  471. CFrame=Root.CFrame,
  472. Shape=0,
  473. Size=Vector3.new(8,8,8),
  474. Transparency=0.3,
  475. }
  476. NoOutline(i)
  477.  
  478. Force=create("BodyForce"){
  479. Parent=i}
  480.  
  481. Vepz=create("BodyVelocity"){
  482. maxForce=Vector3.new(math.huge,0,math.huge),
  483. P=10,
  484. velocity=Vector3.new(0,0,0)}
  485.  
  486. i.Touched:connect(function(Hit)
  487. if not died then
  488. 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
  489. Infections[Hit]=true
  490. Eat(Hit,i,s)
  491. end
  492. end
  493. end)
  494.  
  495. end
  496. i.Size=Vector3.new(Grow,Grow,Grow)
  497. iw.Parent=i
  498. iw.Part0=Root
  499. iw.Part1=i
  500. iw.C0=CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  501. iw.C1=CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  502.  
  503. SizeN.Text=Grow
  504. MSizeN.Text="Max Size: "..MaxGrow
  505.  
  506. workspace.CurrentCamera.CameraSubject=i
  507. hum.PlatformStand=true
  508. Neck.C0=clerp(Neck.C0,CFrame.new(0,0,0),.4)
  509. RS.C0=clerp(RS.C0,CFrame.new(0,0,0),.4)
  510. LS.C0=clerp(LS.C0,CFrame.new(0,0,0),.4)
  511. RH.C0=clerp(RH.C0,CFrame.new(0,0,0),.4)
  512. LH.C0=clerp(LH.C0,CFrame.new(0,0,0),.4)
  513. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement