Advertisement
Createok

Untitled

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