Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IT = Instance.new
- CF = CFrame.new
- VT = Vector3.new
- RAD = math.rad
- C3 = Color3.new
- UD2 = UDim2.new
- BRICKC = BrickColor.new
- ANGLES = CFrame.Angles
- EULER = CFrame.fromEulerAnglesXYZ
- COS = math.cos
- ACOS = math.acos
- SIN = math.sin
- ASIN = math.asin
- ABS = math.abs
- MRANDOM = math.random
- FLOOR = math.floor
- Eating = true
- Eaten = 0
- AllowSit = false
- Networth = 0
- Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
- ArtificialHB = Instance.new("BindableEvent", script)
- ArtificialHB.Name = "ArtificialHB"
- script:WaitForChild("ArtificialHB")
- frame = Frame_Speed
- tf = 0
- allowframeloss = false
- tossremainder = false
- lastframe = tick()
- script.ArtificialHB:Fire()
- game:GetService("RunService").Heartbeat:connect(function(s, p)
- tf = tf + s
- if tf >= frame then
- if allowframeloss then
- script.ArtificialHB:Fire()
- lastframe = tick()
- else
- for i = 1, math.floor(tf / frame) do
- script.ArtificialHB:Fire()
- end
- lastframe = tick()
- end
- if tossremainder then
- tf = 0
- else
- tf = tf - frame * math.floor(tf / frame)
- end
- end
- end)
- function Swait(NUMBER)
- if NUMBER == 0 or NUMBER == nil then
- ArtificialHB.Event:wait()
- else
- for i = 1, NUMBER do
- ArtificialHB.Event:wait()
- end
- end
- end
- function CreateSeat(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
- local NEWPART = IT("Seat")
- NEWPART.formFactor = FORMFACTOR
- NEWPART.Reflectance = REFLECTANCE
- NEWPART.Transparency = TRANSPARENCY
- NEWPART.CanCollide = false
- NEWPART.Locked = true
- NEWPART.Anchored = true
- if ANCHOR == false then
- NEWPART.Anchored = false
- end
- NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
- NEWPART.Name = NAME
- NEWPART.Size = SIZE
- NEWPART.Position = Torso.Position
- NEWPART.Material = MATERIAL
- NEWPART:BreakJoints()
- NEWPART.Parent = PARENT
- return NEWPART
- end
- function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
- local NEWWELD = IT(TYPE)
- NEWWELD.Part0 = PART0
- NEWWELD.Part1 = PART1
- NEWWELD.C0 = C0
- NEWWELD.C1 = C1
- NEWWELD.Parent = PARENT
- return NEWWELD
- end
- Player = owner
- PlayerGui = Player.PlayerGui
- Cam = workspace.CurrentCamera
- Backpack = Player.Backpack
- Character = Player.Character
- Humanoid = Character.Humanoid
- RootPart = Character["HumanoidRootPart"]
- Torso = Character["Torso"]
- Head = Character["Head"]
- RightArm = Character["Right Arm"]
- LeftArm = Character["Left Arm"]
- RightLeg = Character["Right Leg"]
- LeftLeg = Character["Left Leg"]
- RootJoint = RootPart["RootJoint"]
- Neck = Torso["Neck"]
- RightShoulder = Torso["Right Shoulder"]
- LeftShoulder = Torso["Left Shoulder"]
- RightHip = Torso["Right Hip"]
- LeftHip = Torso["Left Hip"]
- function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
- local NEWPART = IT("Part")
- NEWPART.formFactor = FORMFACTOR
- NEWPART.Reflectance = REFLECTANCE
- NEWPART.Transparency = TRANSPARENCY
- NEWPART.CanCollide = false
- NEWPART.Locked = true
- NEWPART.Anchored = true
- if ANCHOR == false then
- NEWPART.Anchored = false
- end
- NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
- NEWPART.Name = NAME
- NEWPART.Size = SIZE
- NEWPART.Position = Torso.Position
- NEWPART.Material = MATERIAL
- NEWPART:BreakJoints()
- NEWPART.Parent = PARENT
- return NEWPART
- end
- function ezweld(P1,P2,CFRAME)
- local ezweld = CreateWeldOrSnapOrMotor("Weld",Character,P1,P2,CFRAME,CF(0,0,0))
- end
- local WormHead = CreatePart(3,Character,"SmoothPlastic",0,0,103,"OofHead",VT(4,4,4),false)
- ezweld(WormHead,Torso,CF(0,0,0))
- local Setg = CreateSeat(3,Character,"SmoothPlastic",0,1,"White","OofHead",VT(2,0.1,2),false)
- ezweld(Setg,WormHead,CF(0,-2,0))
- if AllowSit == false then
- Setg.Disabled = true
- end
- WormHead.CanCollide = true
- local Fac = Instance.new("Decal",WormHead)
- Fac.Face = "Front"
- local RandomFace = math.random(1,3)
- if RandomFace == 1 then
- Fac.Texture = "rbxassetid://15298379"
- else if RandomFace == 2 then
- Fac.Texture = "rbxassetid://162136529"
- else
- Fac.Texture = "rbxassetid://282463320"
- end
- end
- LatestP = WormHead
- local EatPart = CreatePart(3,Character,"SmoothPlastic",0,1,"White","OofHead",VT(4,4,0),false)
- ezweld(EatPart,WormHead,CF(0,0,2))
- EatPart.Touched:Connect(function(nom)
- if Eating == true and nom.Name ~= "Base" and nom.Parent ~= Character and nom.Parent.Parent ~= Character and nom:IsA("Part") then
- nom:Remove()
- Humanoid.WalkSpeed = Humanoid.WalkSpeed + 0.1
- Eaten = Eaten + 1
- local bom = Character:FindFirstChild("Eating")
- if bom then
- bom:Play()
- end
- Networth = Networth +1
- if Eaten == 3 or Eaten > 3 then
- Eaten = 0
- local AP = CreatePart(3,Character,"SmoothPlastic",0,0,"Industrial White","Sitting",VT(4,4,4),false)
- ezweld(AP,LatestP,CF(0,-0.2,-3))
- AP.Massless = true
- Swait()
- AP.CanCollide = true
- Swait(2)
- AP:BreakJoints()
- local Rope = Instance.new("SpringConstraint",LatestP)
- local Attach = Instance.new("Attachment",LatestP)
- local Attach2 = Instance.new("Attachment",AP)
- Attach.Position = VT(0,0,2)
- Attach2.Position = VT(0,0,-2)
- Rope.Attachment0 = Attach
- Rope.Attachment1 = Attach2
- Rope.Visible = false
- Rope.Color = BRICKC("New Yeller")
- Rope.Coils = 3
- Rope.Radius = 0.1
- Rope.MaxLength = 1
- Rope.MinLength = 0
- Rope.MaxForce = 0.2
- Rope.LimitsEnabled = true
- LatestP = AP
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement