Advertisement
HenloMyDude

frankie'swormye

Aug 17th, 2019
384
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.10 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 Compatibility code by Mokiros, Edited by StarzoZero")
  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(),Button2Up=fakeEvent(),Button2Down=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. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  51. return m:TrigEvent(b and "Button2Down" or "Button2Up")
  52. end
  53. for _,t in pairs(CAS.Actions) do
  54. for _,k in pairs(t.Keys) do
  55. if k==io.KeyCode then
  56. t.Function(t.Name,io.UserInputState,io)
  57. end
  58. end
  59. end
  60. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  61. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  62. end
  63. end)
  64. Event.Parent = NLS([==[
  65. local Player = game:GetService("Players").LocalPlayer
  66. local Event = script:WaitForChild("UserInput_Event")
  67. local Mouse = Player:GetMouse()
  68. local UIS = game:GetService("UserInputService")
  69. local input = function(io,a)
  70. if a then return end
  71. --Since InputObject is a client-side instance, we create and pass table instead
  72. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  73. end
  74. UIS.InputBegan:Connect(input)
  75. UIS.InputEnded:Connect(input)
  76. local h,t
  77. --Give the server mouse data 30 times every second, but only if the values changed
  78. --If player is not moving their mouse, client won't fire events
  79. while wait(1/30) do
  80. if h~=Mouse.Hit or t~=Mouse.Target then
  81. h,t=Mouse.Hit,Mouse.Target
  82. Event:FireServer({isMouse=true,Target=t,Hit=h})
  83. end
  84. end]==],Player.Character)
  85.  
  86. ----Sandboxed game object that allows the usage of client-side methods and services
  87. --Real game object
  88. local _rg = game
  89.  
  90. --Metatable for fake service
  91. local fsmt = {
  92. __index = function(self,k)
  93. local s = rawget(self,"_RealService")
  94. if s then
  95. return typeof(s[k])=="function"
  96. and function(_,...)return s[k](s,...)end or s[k]
  97. end
  98. end,
  99. __newindex = function(self,k,v)
  100. local s = rawget(self,"_RealService")
  101. if s then s[k]=v end
  102. end
  103. }
  104. local function FakeService(t,RealService)
  105. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  106. return setmetatable(t,fsmt)
  107. end
  108.  
  109. --Fake game object
  110. local g = {
  111. GetService = function(self,s)
  112. return rawget(self,s) or _rg:GetService(s)
  113. end,
  114. Players = FakeService({
  115. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  116. },"Players"),
  117. UserInputService = FakeService(UIS,"UserInputService"),
  118. ContextActionService = FakeService(CAS,"ContextActionService"),
  119. RunService = FakeService({
  120. _btrs = {},
  121. RenderStepped = _rg:GetService("RunService").Heartbeat,
  122. BindToRenderStep = function(self,name,_,fun)
  123. self._btrs[name] = self.Heartbeat:Connect(fun)
  124. end,
  125. UnbindFromRenderStep = function(self,name)
  126. self._btrs[name]:Disconnect()
  127. end,
  128. },"RunService")
  129. }
  130. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  131. g.service = g.GetService
  132. FakeService(g,game)
  133. --Changing owner to fake player object to support owner:GetMouse()
  134. game,owner = g,g.Players.LocalPlayer
  135. end
  136.  
  137. player = owner
  138. char = player.Character
  139. mouse = player:GetMouse()
  140. Instance.new("Part",char)
  141. for _,v in pairs (char:children()) do
  142. if v:IsA("Part") then
  143. v.Transparency = 1
  144. end
  145. if v:IsA("Hat") or v:IsA("Accessory") then
  146. v:Destroy()
  147. end
  148. end
  149. head = Instance.new("Part",char)
  150. head.BrickColor = BrickColor.new("Maroon")
  151. head.Size = Vector3.new(4,4,4)
  152. head.Material = Enum.Material.SmoothPlastic
  153. weld = Instance.new("Weld",head)
  154. weld.Part0 = head
  155. weld.Part1 = char.HumanoidRootPart
  156. weld.C0 = CFrame.new(0, 1.25, 0)
  157. char.Head.face:Destroy()
  158. char.Torso.Neck.C0 = CFrame.new(0, 0, 0)
  159. face = Instance.new("Decal",head)
  160. face.Face = "Front"
  161. face.Texture = "http://www.roblox.com/asset/?id=28265270"
  162.  
  163. roar = false
  164. eating = false
  165. sit = false
  166. lazer = false
  167. eatface = "http://www.roblox.com/asset/?id=1149279247"
  168. roarface = "http://www.roblox.com/asset/?id=479872542"
  169. reeface = "http://www.roblox.com/asset/?id=109676489"
  170. spagface = "http://www.roblox.com/asset/?id=162638969"
  171. lazerface = "http://www.roblox.com/asset/?id=280866530"
  172.  
  173. spagm = "rbxassetid://830174420"
  174.  
  175. function swait(num)
  176. if num == 0 or num == nil then
  177. ArtificialHB.Event:wait()
  178. else
  179. for i = 0, num do
  180. ArtificialHB.Event:wait()
  181. end
  182. end
  183. end
  184.  
  185. local r = 255
  186. local g = 0
  187. local b = 0
  188. coroutine.resume(coroutine.create(function()
  189. while wait() do
  190. for i = 0, 254/5 do
  191. swait()
  192. g = g + 5
  193. end
  194. for i = 0, 254/5 do
  195. swait()
  196. r = r - 5
  197. end
  198. for i = 0, 254/5 do
  199. swait()
  200. b = b + 5
  201. end
  202. for i = 0, 254/5 do
  203. swait()
  204. g = g - 5
  205. end
  206. for i = 0, 254/5 do
  207. swait()
  208. r = r + 5
  209. end
  210. for i = 0, 254/5 do
  211. swait()
  212. b = b - 5
  213. end
  214. end
  215. end))
  216.  
  217.  
  218. mouse.KeyDown:connect(function(key)
  219. key=key:lower()
  220. if key == "q" and roar == false and lazer == false then
  221. if eating then
  222. eating = false
  223. face.Texture = "http://www.roblox.com/asset/?id=28265270"
  224. else
  225. eating = true
  226. face.Texture = eatface
  227. end
  228. end
  229. if key == "v" and lazer == false and roar == false then
  230. lazer = true
  231. local pos = Instance.new("Part",head)
  232. pos.Transparency = 1
  233. pos.CanCollide = false
  234. pos.Position = head.Position
  235. pos.Anchored = true
  236. local beam = Instance.new("Part",head)
  237. beam.Size = Vector3.new(3.95, 3.95, 1000)
  238. beam.CanCollide = false
  239. beam.Position = head.Position
  240. beam.Material = "Neon"
  241. local pew = Instance.new("Sound",head)
  242. pew.SoundId = "rbxassetid://294188875"
  243. pew.Volume = 10
  244. pew.Looped = true
  245. pew:Play()
  246. beam.Touched:connect(function(hit)
  247. if hit.Parent ~= workspace and hit.Name ~= "Base" and hit.Parent ~= char then
  248. hit:Destroy()
  249. end
  250. end)
  251. local ezweld = Instance.new("Weld",beam)
  252. ezweld.Part0 = beam
  253. ezweld.Part1 = pos
  254. ezweld.C0 = CFrame.new(0, 0, 502)
  255. face.Texture = lazerface
  256. repeat
  257. Swait()
  258. beam.Color = Color3.new(r/255,g/255,b/255)
  259. pos.CFrame = CFrame.new(head.Position, mouse.Hit.p)
  260. until lazer == false
  261. lazer = false
  262. pos:Destroy()
  263. beam:Destroy()
  264. pew:Destroy()
  265. face.Texture = "http://www.roblox.com/asset/?id=28265270"
  266. end
  267. if key == "e" and roar == false then
  268. roar = true
  269. local sick = Instance.new("Sound",char)
  270. sick.SoundId = "rbxassetid://138271815"
  271. sick.Pitch = 1
  272. sick.Name = "ROAR"
  273. sick.MaxDistance = 150
  274. sick.Volume = 2
  275. sick:Play()
  276. Rawr = sick
  277. face.Texture = roarface
  278. if Rawr then
  279. Rawr:Play()
  280. Swait(40)
  281. if eating == false then
  282. face.Texture = "http://www.roblox.com/asset/?id=28265270"
  283. roar = false
  284. else
  285. face.Texture = eatface
  286. roar = false
  287. end
  288. end
  289. end
  290. if key == "t" and roar == false then
  291. roar = true
  292. char.Humanoid.WalkSpeed = char.Humanoid.WalkSpeed + 25
  293. local sick = Instance.new("Sound",char)
  294. sick.SoundId = "rbxassetid://1205457048"
  295. sick.Pitch = 1
  296. sick.Name = "REE"
  297. sick.MaxDistance = 150
  298. sick.Volume = 10
  299. sick:Play()
  300. Rawr = sick
  301. face.Texture = reeface
  302. if Rawr then
  303. Rawr:Play()
  304. Swait(140)
  305. if eating == false then
  306. face.Texture = "http://www.roblox.com/asset/?id=28265270"
  307. roar = false
  308. char.Humanoid.WalkSpeed = char.Humanoid.WalkSpeed - 25
  309. else
  310. face.Texture = eatface
  311. roar = false
  312. char.Humanoid.WalkSpeed = char.Humanoid.WalkSpeed - 25
  313. end
  314. end
  315. end
  316. if key == "x" and roar == false then
  317. roar = true
  318. char.Humanoid.WalkSpeed = char.Humanoid.WalkSpeed + 0
  319. local sick = Instance.new("Sound",char)
  320. sick.SoundId = "rbxassetid://130992510"
  321. sick.Pitch = 1
  322. sick.Name = "spaghetti."
  323. sick.MaxDistance = 150
  324. sick.Volume = 10
  325. sick.TimePosition = 0
  326. sick:Play()
  327. Rawr = sick
  328. face.Texture = spagface
  329. local spaghet = Instance.new("Part",char)
  330. spaghet.Size = Vector3.new(0.1, 0.1, 0.1)
  331. spaghet.BrickColor = BrickColor.new("Gold")
  332. local weld = Instance.new("Weld",spaghet)
  333. weld.Part0 = spaghet
  334. weld.Part1 = head
  335. local mesh = Instance.new("SpecialMesh",spaghet)
  336. mesh.MeshId = spagm
  337. mesh.Offset = Vector3.new(0, 2, 0)
  338. mesh.Scale = Vector3.new(0.03, 0.03, 0.03)
  339. if Rawr then
  340. Rawr:Play()
  341. Swait(75)
  342. if eating == false then
  343. char.Humanoid.Health = char.Humanoid.Health + 15
  344. face.Texture = "http://www.roblox.com/asset/?id=28265270"
  345. roar = false
  346. Rawr:Destroy()
  347. spaghet:Destroy()
  348. char.Humanoid.WalkSpeed = char.Humanoid.WalkSpeed - 0
  349. else
  350. char.Humanoid.Health = char.Humanoid.Health + 15
  351. face.Texture = eatface
  352. roar = false
  353. Rawr:Destroy()
  354. spaghet:Destroy()
  355. char.Humanoid.WalkSpeed = char.Humanoid.WalkSpeed - 0
  356. end
  357. end
  358. end
  359. if key == "r" and roar == false then
  360. if sit then
  361. sit = false
  362. for _,v in pairs (char.Torso:children()) do
  363. if v:IsA("Seat") then
  364. v:Destroy()
  365. warn("Sitting Not Allowed")
  366. end
  367. end
  368. else
  369. sit = true
  370. warn("Sitting Allowed")
  371. local seat = Instance.new("Seat",char.Torso)
  372. seat.Transparency = 1
  373. seat.Position = head.Position
  374. local weld = Instance.new("Weld",seat)
  375. weld.Part0 = seat
  376. weld.Part1 = head
  377. weld.C0 = CFrame.new(0, -1, 0)
  378. end
  379. end
  380. end)
  381.  
  382. mouse.KeyUp:connect(function(key)
  383. key=key:lower()
  384. if key == "v" then
  385. lazer = false
  386. end
  387. end)
  388.  
  389. latestp = head
  390.  
  391.  
  392. ArtificialHB = Instance.new("BindableEvent", script)
  393. ArtificialHB.Name = "ArtificialHB"
  394.  
  395. script:WaitForChild("ArtificialHB")
  396.  
  397. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  398. frame = Frame_Speed
  399. tf = 0
  400. allowframeloss = false
  401. tossremainder = false
  402. lastframe = tick()
  403. script.ArtificialHB:Fire()
  404.  
  405. game:GetService("RunService").Heartbeat:connect(function(s, p)
  406. tf = tf + s
  407. if tf >= frame then
  408. if allowframeloss then
  409. script.ArtificialHB:Fire()
  410. lastframe = tick()
  411. else
  412. for i = 1, math.floor(tf / frame) do
  413. script.ArtificialHB:Fire()
  414. end
  415. lastframe = tick()
  416. end
  417. if tossremainder then
  418. tf = 0
  419. else
  420. tf = tf - frame * math.floor(tf / frame)
  421. end
  422. end
  423. end)
  424.  
  425. function Swait(NUMBER)
  426. if NUMBER == 0 or NUMBER == nil then
  427. ArtificialHB.Event:wait()
  428. else
  429. for i = 1, NUMBER do
  430. ArtificialHB.Event:wait()
  431. end
  432. end
  433. end
  434.  
  435. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  436. local NEWWELD = Instance.new(TYPE)
  437. NEWWELD.Part0 = PART0
  438. NEWWELD.Part1 = PART1
  439. NEWWELD.C0 = C0
  440. NEWWELD.C1 = C1
  441. NEWWELD.Parent = PARENT
  442. return NEWWELD
  443. end
  444.  
  445. function ezweld(P1,P2,CFRAME)
  446. local ezweld = CreateWeldOrSnapOrMotor("Weld",char,P1,P2,CFRAME,CFrame.new(0,0,0))
  447. end
  448. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  449. local NEWPART = Instance.new("Part")
  450. NEWPART.formFactor = FORMFACTOR
  451. NEWPART.Reflectance = REFLECTANCE
  452. NEWPART.Transparency = TRANSPARENCY
  453. NEWPART.CanCollide = false
  454. NEWPART.Locked = true
  455. NEWPART.Anchored = true
  456. if ANCHOR == false then
  457. NEWPART.Anchored = false
  458. end
  459. NEWPART.BrickColor = BrickColor.new(tostring(BRICKCOLOR))
  460. NEWPART.Name = NAME
  461. NEWPART.Size = SIZE
  462. NEWPART.Position = char.Torso.Position
  463. NEWPART.Material = MATERIAL
  464. NEWPART:BreakJoints()
  465. NEWPART.Parent = PARENT
  466. return NEWPART
  467. end
  468.  
  469. LatestP = head
  470. VT = Vector3.new
  471. Eaten = 0
  472. Networth = 0
  473.  
  474. nom = Instance.new("Sound",head)
  475. nom.Volume = 10
  476. nom.SoundId = "rbxassetid://1278031541"
  477.  
  478. song = Instance.new("Sound",head)
  479. song.Volume = 5
  480. song.SoundId = "rbxassetid://1349023179"
  481. song.Looped = true
  482. song:Play()
  483.  
  484. local sur = Instance.new("BillboardGui", head)
  485. sur.Name = "BillboardGui"
  486. sur.Adornee = head
  487. sur.Size = UDim2.new(4, 0, 0.5, 0)
  488. sur.StudsOffset = Vector3.new(0, 8, 0)
  489. local text = Instance.new("TextBox", sur)
  490. text.Text = "Munchy Boi"
  491. text.Size = UDim2.new(1, 0, 5, 0)
  492. text.TextScaled = true
  493. text.BackgroundTransparency = 1
  494. text.Font = Enum.Font.Arcade
  495. text.TextColor3 = BrickColor.new("Maroon").Color
  496. text.TextStrokeColor3 = BrickColor.new("Gold").Color
  497. text.TextStrokeTransparency = 0
  498.  
  499. local sur2 = Instance.new("BillboardGui", head)
  500. sur2.Name = "BillboardGui"
  501. sur2.Adornee = head
  502. sur2.Size = UDim2.new(1, 0, 0.5, 0)
  503. sur2.StudsOffset = Vector3.new(0, 0, 0)
  504. local text2 = Instance.new("TextBox", sur)
  505. text2.Text = owner.Name
  506. text2.Size = UDim2.new(1, 0, 1, 0)
  507. text2.TextScaled = true
  508. text2.BackgroundTransparency = 1
  509. text2.Font = Enum.Font.Arcade
  510. text2.TextColor3 = BrickColor.new("Maroon").Color
  511. text2.TextStrokeColor3 = BrickColor.new("Gold").Color
  512. text2.TextStrokeTransparency = 0
  513.  
  514. head.Touched:connect(function(hit)
  515. if hit.Parent ~= char and hit.Name ~= "Base" and eating == true and hit ~= head then
  516. Eaten = Eaten + 1
  517. hit:Destroy()
  518. Networth = Networth + 1
  519. nom:Play()
  520. char.Humanoid.WalkSpeed = char.Humanoid.WalkSpeed + 0.1
  521. end
  522. if Eaten == 3 or Eaten > 3 then
  523. Eaten = 0
  524. local AP = CreatePart(3,char,"SmoothPlastic",0,0,"Gold","Sitting",Vector3.new(4,4,4),false)
  525. ezweld(AP,LatestP,CFrame.new(0,-0.2,-3))
  526. AP.Massless = true
  527. Swait()
  528. AP.CanCollide = true
  529. Swait(2)
  530. AP:BreakJoints()
  531. local Rope = Instance.new("SpringConstraint",LatestP)
  532. local Attach = Instance.new("Attachment",LatestP)
  533. local Attach2 = Instance.new("Attachment",AP)
  534. Attach.Position = Vector3.new(0,0,2)
  535. Attach2.Position = Vector3.new(0,0,-2)
  536. Rope.Attachment0 = Attach
  537. Rope.Attachment1 = Attach2
  538. Rope.Visible = true
  539. Rope.Color = BrickColor.new("Gold")
  540. Rope.Coils = 3
  541. Rope.Radius = 0.1
  542. Rope.MaxLength = 1
  543. Rope.MinLength = 0
  544. Rope.MaxForce = 0.2
  545. Rope.LimitsEnabled = true
  546. LatestP = AP
  547. end
  548. end)
  549.  
  550. --Instructions:
  551.  
  552. --Making the worm model:
  553. --Make sure to use Instance.new("Part",char)
  554. --Make sure to put player = owner at the start of the script
  555. --(player is a variable for the person using the script)
  556. --Make sure to put char = player.Character after player = owner
  557. --(make sure to drop lines with Enter when you finish a line of code.)
  558. --Make sure to put head = Instance.new("Part",char) and also after that
  559. --head.BrickColor = BrickColor.new("color")
  560.  
  561. --Part 2: Making the eat command
  562. --WARNING: DO NOT DO THIS UNTIL I SAY YOU SHOULD, AND DONT DO IT WITHOUT
  563. --READING THE TUTORIAL PLEASE.
  564.  
  565. --I will write the instructions for the eat command when you have finished the
  566. --character
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement