Guest User

Untitled

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