SHOW:
|
|
- or go back to the newest paste.
1 | if game:GetService("RunService"):IsClient()then error("Please run as a server script. Use h/ instead of hl/.")end;print("FE Compatibility: by WaverlyCole");InternalData = {} | |
2 | do | |
3 | script.Parent = owner.Character | |
4 | local Event = Instance.new("RemoteEvent");Event.Name = "UserInput" | |
5 | local function NewFakeEvent() | |
6 | local Bind = Instance.new("BindableEvent") | |
7 | local Fake;Fake = {Connections = {}, | |
8 | fakeEvent=true; | |
9 | Connect=function(self,Func) | |
10 | Bind.Event:connect(Func) | |
11 | self.Connections[Bind] = true | |
12 | return setmetatable({Connected = true},{ | |
13 | __index = function (self,Index) | |
14 | if Index:lower() == "disconnect" then | |
15 | return function() Fake.Connections[Bind] = false;self.Connected = false end | |
16 | end | |
17 | return Fake[Index] | |
18 | end; | |
19 | __tostring = function() return "Connection" end; | |
20 | }) | |
21 | end} | |
22 | Fake.connect = Fake.Connect;return Fake; | |
23 | end | |
24 | local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()} | |
25 | local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()} | |
26 | local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...) | |
27 | self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil | |
28 | end};ContextActionService.UnBindAction = ContextActionService.BindAction | |
29 | local function TriggerEvent(self,Event,...) | |
30 | local Trigger = Mouse[Event] | |
31 | if Trigger and Trigger.fakeEvent and Trigger.Connections then | |
32 | for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end | |
33 | end | |
34 | end | |
35 | Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent | |
36 | Event.OnServerEvent:Connect(function(FiredBy,Input) | |
37 | if FiredBy.Name ~= owner.Name then return end | |
38 | if Input.MouseEvent then | |
39 | Mouse.Target = Input.Target;Mouse.Hit = Input.Hit | |
40 | else | |
41 | local Begin = Input.UserInputState == Enum.UserInputState.Begin | |
42 | if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end | |
43 | for _,Action in pairs(ContextActionService.Actions) do | |
44 | for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end | |
45 | end | |
46 | Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower()) | |
47 | UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false) | |
48 | end | |
49 | end) | |
50 | InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService | |
51 | Event.Parent = NLS([[ | |
52 | local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse() | |
53 | local Input = function(Input,gameProcessedEvent) | |
54 | if gameProcessedEvent then return end | |
55 | Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState}) | |
56 | end | |
57 | UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input) | |
58 | local Hit,Target | |
59 | while wait(1/30) do | |
60 | if Hit ~= Mouse.Hit or Target ~= Mouse.Target then | |
61 | Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit}) | |
62 | end | |
63 | end | |
64 | ]],owner.Character) | |
65 | end | |
66 | RealGame = game;game = setmetatable({},{ | |
67 | __index = function (self,Index) | |
68 | local Sandbox = function (Thing) | |
69 | if Thing:IsA("Player") then | |
70 | local RealPlayer = Thing | |
71 | return setmetatable({},{ | |
72 | __index = function (self,Index) | |
73 | local Type = type(RealPlayer[Index]) | |
74 | if Type == "function" then | |
75 | if Index:lower() == "getmouse" or Index:lower() == "mouse" then | |
76 | return function (self)return InternalData["Mouse"] end | |
77 | end | |
78 | return function (self,...)return RealPlayer[Index](RealPlayer,...) end | |
79 | end | |
80 | return RealPlayer[Index] | |
81 | end; | |
82 | __tostring = function(self) return RealPlayer.Name end | |
83 | }) | |
84 | end | |
85 | end | |
86 | if RealGame[Index] then | |
87 | local Type = type(RealGame[Index]) | |
88 | if Type == "function" then | |
89 | if Index:lower() == "getservice" or Index:lower() == "service" then | |
90 | return function (self,Service) | |
91 | local FakeServices = { | |
92 | ["players"] = function() | |
93 | return setmetatable({},{ | |
94 | __index = function (self2,Index2) | |
95 | local RealService = RealGame:GetService(Service) | |
96 | local Type2 = type(Index2) | |
97 | if Type2 == "function" then | |
98 | return function (self,...) return RealService[Index2](RealService,...)end | |
99 | else | |
100 | if Index2:lower() == "localplayer" then return Sandbox(owner) end | |
101 | return RealService[Index2] | |
102 | end | |
103 | end; | |
104 | __tostring = function(self) return RealGame:GetService(Service).Name end | |
105 | }) | |
106 | end; | |
107 | ["contextactionservice"] = function() return InternalData["ContextActionService"] end; | |
108 | ["userinputservice"] = function() return InternalData["UserInputService"] end; | |
109 | ["runservice"] = function() | |
110 | return setmetatable({},{ | |
111 | __index = function(self2,Index2) | |
112 | local RealService = RealGame:GetService(Service) | |
113 | local Type2 = type(Index2) | |
114 | if Type2 == "function" then | |
115 | return function (self,...) return RealService[Index2](RealService,...) end | |
116 | else | |
117 | local RunServices = { | |
118 | ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end; | |
119 | ["renderstepped"] = function() return RealService["Stepped"] end | |
120 | } | |
121 | if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end | |
122 | return RealService[Index2] | |
123 | end | |
124 | end | |
125 | }) | |
126 | end | |
127 | } | |
128 | if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end | |
129 | return RealGame:GetService(Service) | |
130 | end | |
131 | end | |
132 | return function (self,...) return RealGame[Index](RealGame,...) end | |
133 | else | |
134 | if game:GetService(Index) then return game:GetService(Index) end | |
135 | return RealGame[Index] | |
136 | end | |
137 | end | |
138 | return nil | |
139 | end | |
140 | });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete! Running...") | |
141 | ||
142 | Player = game:GetService("Players").LocalPlayer | |
143 | PlayerGui = Player.PlayerGui | |
144 | Cam = workspace.CurrentCamera | |
145 | Backpack = Player.Backpack | |
146 | Character = Player.Character | |
147 | Humanoid = Character.Humanoid | |
148 | Mouse = Player:GetMouse() | |
149 | RootPart = Character["HumanoidRootPart"] | |
150 | Torso = Character["Torso"] | |
151 | Head = Character["Head"] | |
152 | RightArm = Character["Right Arm"] | |
153 | LeftArm = Character["Left Arm"] | |
154 | RightLeg = Character["Right Leg"] | |
155 | LeftLeg = Character["Left Leg"] | |
156 | RootJoint = RootPart["RootJoint"] | |
157 | Neck = Torso["Neck"] | |
158 | RightShoulder = Torso["Right Shoulder"] | |
159 | LeftShoulder = Torso["Left Shoulder"] | |
160 | RightHip = Torso["Right Hip"] | |
161 | LeftHip = Torso["Left Hip"] | |
162 | function EatSound() | |
163 | local sick = Instance.new("Sound",Character) | |
164 | sick.SoundId = "rbxassetid://625712280" | |
165 | sick.Pitch = 1 | |
166 | sick.Name = "Eating" | |
167 | sick.MaxDistance = 150 | |
168 | sick.Volume = 2 | |
169 | end | |
170 | ||
171 | epic = Instance.new("Sound",Head) | |
172 | epic.Playing = true | |
173 | epic.Looped = true | |
174 | epic.Volume = 5 | |
175 | epic.SoundId = "rbxassetid://3090964224" | |
176 | ||
177 | ||
178 | IT = Instance.new | |
179 | CF = CFrame.new | |
180 | VT = Vector3.new | |
181 | RAD = math.rad | |
182 | C3 = Color3.new | |
183 | UD2 = UDim2.new | |
184 | BRICKC = BrickColor.new | |
185 | ANGLES = CFrame.Angles | |
186 | EULER = CFrame.fromEulerAnglesXYZ | |
187 | COS = math.cos | |
188 | ACOS = math.acos | |
189 | SIN = math.sin | |
190 | ASIN = math.asin | |
191 | ABS = math.abs | |
192 | MRANDOM = math.random | |
193 | FLOOR = math.floor | |
194 | ||
195 | --//=================================\\ | |
196 | --|| USEFUL VALUES | |
197 | --\\=================================// | |
198 | ||
199 | Animation_Speed = 3 | |
200 | Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60) | |
201 | local Speed = 45 | |
202 | local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
203 | local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
204 | local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) | |
205 | local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) | |
206 | local DAMAGEMULTIPLIER = 1 | |
207 | local ANIM = "Idle" | |
208 | local ATTACK = false | |
209 | local EQUIPPED = false | |
210 | local HOLD = false | |
211 | local COMBO = 1 | |
212 | local Rooted = false | |
213 | local SINE = 0 | |
214 | local KEYHOLD = false | |
215 | local CHANGE = 2 / Animation_Speed | |
216 | local WALKINGANIM = false | |
217 | local VALUE1 = false | |
218 | local VALUE2 = false | |
219 | local ROBLOXIDLEANIMATION = IT("Animation") | |
220 | ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation" | |
221 | ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571" | |
222 | --ROBLOXIDLEANIMATION.Parent = Humanoid | |
223 | local WEAPONGUI = IT("ScreenGui", PlayerGui) | |
224 | WEAPONGUI.Name = "Weapon GUI" | |
225 | local Effects = IT("Folder", Character) | |
226 | Effects.Name = "Effects" | |
227 | local ANIMATOR = Humanoid.Animator | |
228 | local ANIMATE = Character.Animate | |
229 | local UNANCHOR = true | |
230 | local HITPOS = nil | |
231 | local HITFLOOR = nil | |
232 | local BODY = {} | |
233 | ||
234 | --//=================================\\ | |
235 | --\\=================================// | |
236 | function chatf(text) | |
237 | local chat = coroutine.wrap(function() | |
238 | if Character:FindFirstChild("TalkingBillBoard")~= nil then | |
239 | Character:FindFirstChild("TalkingBillBoard"):destroy() | |
240 | end | |
241 | local Bill = Instance.new("BillboardGui",Character) | |
242 | Bill.Size = UDim2.new(0,100,0,40) | |
243 | Bill.StudsOffset = Vector3.new(0,3,0) | |
244 | Bill.Adornee = Character.Head | |
245 | Bill.Name = "TalkingBillBoard" | |
246 | local Heh = Instance.new("TextLabel",Bill) | |
247 | Heh.BackgroundTransparency = 1 | |
248 | Heh.BorderSizePixel = 0 | |
249 | Heh.Text = "" | |
250 | Heh.Font = "Fantasy" | |
251 | Heh.TextSize = 40 | |
252 | Heh.TextStrokeTransparency = 0 | |
253 | Heh.Size = UDim2.new(1,0,0.5,0) | |
254 | coroutine.resume(coroutine.create(function() | |
255 | while Heh ~= nil do | |
256 | Swait() | |
257 | Heh.Position = UDim2.new(math.random(-.4,.4),math.random(-5,5),.05,math.random(-5,5)) | |
258 | Heh.Rotation = math.random(-5,5) | |
259 | Heh.TextColor3 = Color3.new(50/255,0,0) | |
260 | Heh.TextStrokeColor3 = Color3.new(255/255,0,0) | |
261 | end | |
262 | end)) | |
263 | for i = 1,string.len(text),1 do | |
264 | Swait() | |
265 | Heh.Text = string.sub(text,1,i) | |
266 | end | |
267 | Swait(90)--Re[math.random(1, 93)] | |
268 | for i = 0, 1, .025 do | |
269 | Swait() | |
270 | Bill.ExtentsOffset = Vector3.new(math.random(-i, i), math.random(-i, i), math.random(-i, i)) | |
271 | Heh.TextStrokeTransparency = i | |
272 | Heh.TextTransparency = i | |
273 | end | |
274 | Bill:Destroy() | |
275 | end) | |
276 | chat() | |
277 | end | |
278 | ||
279 | function chatfunc(text) | |
280 | local chat = coroutine.wrap(function() | |
281 | if Character:FindFirstChild("TalkingBillBoard")~= nil then | |
282 | Character:FindFirstChild("TalkingBillBoard"):destroy() | |
283 | end | |
284 | local Bill = Instance.new("BillboardGui",Character) | |
285 | Bill.Size = UDim2.new(0,100,0,40) | |
286 | Bill.StudsOffset = Vector3.new(0,3,0) | |
287 | Bill.Adornee = Character.Head | |
288 | Bill.Name = "TalkingBillBoard" | |
289 | local Hehe = Instance.new("TextLabel",Bill) | |
290 | Hehe.BackgroundTransparency = 1 | |
291 | Hehe.BorderSizePixel = 0 | |
292 | Hehe.Text = "" | |
293 | Hehe.Font = "Garamond" | |
294 | Hehe.TextSize = 40 | |
295 | Hehe.TextStrokeTransparency = 0 | |
296 | Hehe.Size = UDim2.new(1,0,0.5,0) | |
297 | coroutine.resume(coroutine.create(function() | |
298 | while Hehe ~= nil do | |
299 | Swait() | |
300 | Hehe.Position = UDim2.new(math.random(-.4,.4),math.random(-5,5),.05,math.random(-5,5)) | |
301 | Hehe.Rotation = math.random(-5,5) | |
302 | Hehe.TextColor3 = Color3.new(0,0,50/255) | |
303 | Hehe.TextStrokeColor3 = Color3.new(0,0,100/255) | |
304 | end | |
305 | end)) | |
306 | for i = 1,string.len(text),1 do | |
307 | Swait() | |
308 | Hehe.Text = string.sub(text,1,i) | |
309 | end | |
310 | Swait(90)--Re[math.random(1, 93)] | |
311 | for i = 0, 1, .025 do | |
312 | Swait() | |
313 | Bill.ExtentsOffset = Vector3.new(math.random(-i, i), math.random(-i, i), math.random(-i, i)) | |
314 | Hehe.TextStrokeTransparency = i | |
315 | Hehe.TextTransparency = i | |
316 | end | |
317 | Bill:Destroy() | |
318 | end) | |
319 | chat() | |
320 | end | |
321 | ||
322 | --//=================================\\ | |
323 | --|| SAZERENOS' ARTIFICIAL HEARTBEAT | |
324 | --\\=================================// | |
325 | ||
326 | ArtificialHB = Instance.new("BindableEvent", script) | |
327 | ArtificialHB.Name = "ArtificialHB" | |
328 | ||
329 | script:WaitForChild("ArtificialHB") | |
330 | ||
331 | frame = Frame_Speed | |
332 | tf = 0 | |
333 | allowframeloss = false | |
334 | tossremainder = false | |
335 | lastframe = tick() | |
336 | script.ArtificialHB:Fire() | |
337 | ||
338 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
339 | tf = tf + s | |
340 | if tf >= frame then | |
341 | if allowframeloss then | |
342 | script.ArtificialHB:Fire() | |
343 | lastframe = tick() | |
344 | else | |
345 | for i = 1, math.floor(tf / frame) do | |
346 | script.ArtificialHB:Fire() | |
347 | end | |
348 | lastframe = tick() | |
349 | end | |
350 | if tossremainder then | |
351 | tf = 0 | |
352 | else | |
353 | tf = tf - frame * math.floor(tf / frame) | |
354 | end | |
355 | end | |
356 | end) | |
357 | ||
358 | --//=================================\\ | |
359 | --\\=================================// | |
360 | ||
361 | --//=================================\\ | |
362 | --|| SOME FUNCTIONS | |
363 | --\\=================================// | |
364 | ||
365 | function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS) | |
366 | return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS) | |
367 | end | |
368 | ||
369 | function PositiveAngle(NUMBER) | |
370 | if NUMBER >= 0 then | |
371 | NUMBER = 0 | |
372 | end | |
373 | return NUMBER | |
374 | end | |
375 | ||
376 | function NegativeAngle(NUMBER) | |
377 | if NUMBER <= 0 then | |
378 | NUMBER = 0 | |
379 | end | |
380 | return NUMBER | |
381 | end | |
382 | ||
383 | function Swait(NUMBER) | |
384 | if NUMBER == 0 or NUMBER == nil then | |
385 | ArtificialHB.Event:wait() | |
386 | else | |
387 | for i = 1, NUMBER do | |
388 | ArtificialHB.Event:wait() | |
389 | end | |
390 | end | |
391 | end | |
392 | ||
393 | function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET) | |
394 | local NEWMESH = IT(MESH) | |
395 | if MESH == "SpecialMesh" then | |
396 | NEWMESH.MeshType = MESHTYPE | |
397 | if MESHID ~= "nil" and MESHID ~= "" then | |
398 | NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID | |
399 | end | |
400 | if TEXTUREID ~= "nil" and TEXTUREID ~= "" then | |
401 | NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID | |
402 | end | |
403 | end | |
404 | NEWMESH.Offset = OFFSET or VT(0, 0, 0) | |
405 | NEWMESH.Scale = SCALE | |
406 | NEWMESH.Parent = PARENT | |
407 | return NEWMESH | |
408 | end | |
409 | ||
410 | function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR) | |
411 | local NEWPART = IT("Part") | |
412 | NEWPART.formFactor = FORMFACTOR | |
413 | NEWPART.Reflectance = REFLECTANCE | |
414 | NEWPART.Transparency = TRANSPARENCY | |
415 | NEWPART.CanCollide = false | |
416 | NEWPART.Locked = true | |
417 | NEWPART.Anchored = true | |
418 | if ANCHOR == false then | |
419 | NEWPART.Anchored = false | |
420 | end | |
421 | NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR)) | |
422 | NEWPART.Name = NAME | |
423 | NEWPART.Size = SIZE | |
424 | NEWPART.Position = Torso.Position | |
425 | NEWPART.Material = MATERIAL | |
426 | NEWPART:BreakJoints() | |
427 | NEWPART.Parent = PARENT | |
428 | return NEWPART | |
429 | end | |
430 | ||
431 | function CreateSeat(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR) | |
432 | local NEWPART = IT("Seat") | |
433 | NEWPART.formFactor = FORMFACTOR | |
434 | NEWPART.Reflectance = REFLECTANCE | |
435 | NEWPART.Transparency = TRANSPARENCY | |
436 | NEWPART.CanCollide = false | |
437 | NEWPART.Locked = true | |
438 | NEWPART.Anchored = true | |
439 | if ANCHOR == false then | |
440 | NEWPART.Anchored = false | |
441 | end | |
442 | NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR)) | |
443 | NEWPART.Name = NAME | |
444 | NEWPART.Size = SIZE | |
445 | NEWPART.Position = Torso.Position | |
446 | NEWPART.Material = MATERIAL | |
447 | NEWPART:BreakJoints() | |
448 | NEWPART.Parent = PARENT | |
449 | return NEWPART | |
450 | end | |
451 | ||
452 | local function weldBetween(a, b) | |
453 | local weldd = Instance.new("ManualWeld") | |
454 | weldd.Part0 = a | |
455 | weldd.Part1 = b | |
456 | weldd.C0 = CFrame.new() | |
457 | weldd.C1 = b.CFrame:inverse() * a.CFrame | |
458 | weldd.Parent = a | |
459 | return weldd | |
460 | end | |
461 | ||
462 | ||
463 | function QuaternionFromCFrame(cf) | |
464 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
465 | local trace = m00 + m11 + m22 | |
466 | if trace > 0 then | |
467 | local s = math.sqrt(1 + trace) | |
468 | local recip = 0.5 / s | |
469 | return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5 | |
470 | else | |
471 | local i = 0 | |
472 | if m11 > m00 then | |
473 | i = 1 | |
474 | end | |
475 | if m22 > (i == 0 and m00 or m11) then | |
476 | i = 2 | |
477 | end | |
478 | if i == 0 then | |
479 | local s = math.sqrt(m00 - m11 - m22 + 1) | |
480 | local recip = 0.5 / s | |
481 | return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip | |
482 | elseif i == 1 then | |
483 | local s = math.sqrt(m11 - m22 - m00 + 1) | |
484 | local recip = 0.5 / s | |
485 | return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip | |
486 | elseif i == 2 then | |
487 | local s = math.sqrt(m22 - m00 - m11 + 1) | |
488 | local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip | |
489 | end | |
490 | end | |
491 | end | |
492 | ||
493 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
494 | local xs, ys, zs = x + x, y + y, z + z | |
495 | local wx, wy, wz = w * xs, w * ys, w * zs | |
496 | local xx = x * xs | |
497 | local xy = x * ys | |
498 | local xz = x * zs | |
499 | local yy = y * ys | |
500 | local yz = y * zs | |
501 | local zz = z * zs | |
502 | return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy)) | |
503 | end | |
504 | ||
505 | function QuaternionSlerp(a, b, t) | |
506 | local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4] | |
507 | local startInterp, finishInterp; | |
508 | if cosTheta >= 0.0001 then | |
509 | if (1 - cosTheta) > 0.0001 then | |
510 | local theta = ACOS(cosTheta) | |
511 | local invSinTheta = 1 / SIN(theta) | |
512 | startInterp = SIN((1 - t) * theta) * invSinTheta | |
513 | finishInterp = SIN(t * theta) * invSinTheta | |
514 | else | |
515 | startInterp = 1 - t | |
516 | finishInterp = t | |
517 | end | |
518 | else | |
519 | if (1 + cosTheta) > 0.0001 then | |
520 | local theta = ACOS(-cosTheta) | |
521 | local invSinTheta = 1 / SIN(theta) | |
522 | startInterp = SIN((t - 1) * theta) * invSinTheta | |
523 | finishInterp = SIN(t * theta) * invSinTheta | |
524 | else | |
525 | startInterp = t - 1 | |
526 | finishInterp = t | |
527 | end | |
528 | end | |
529 | return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp | |
530 | end | |
531 | ||
532 | function Clerp(a, b, t) | |
533 | local qa = {QuaternionFromCFrame(a)} | |
534 | local qb = {QuaternionFromCFrame(b)} | |
535 | local ax, ay, az = a.x, a.y, a.z | |
536 | local bx, by, bz = b.x, b.y, b.z | |
537 | local _t = 1 - t | |
538 | return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) | |
539 | end | |
540 | ||
541 | function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME) | |
542 | local frame = IT("Frame") | |
543 | frame.BackgroundTransparency = TRANSPARENCY | |
544 | frame.BorderSizePixel = BORDERSIZEPIXEL | |
545 | frame.Position = POSITION | |
546 | frame.Size = SIZE | |
547 | frame.BackgroundColor3 = COLOR | |
548 | frame.BorderColor3 = BORDERCOLOR | |
549 | frame.Name = NAME | |
550 | frame.Parent = PARENT | |
551 | return frame | |
552 | end | |
553 | ||
554 | function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME) | |
555 | local label = IT("TextLabel") | |
556 | label.BackgroundTransparency = 1 | |
557 | label.Size = UD2(1, 0, 1, 0) | |
558 | label.Position = UD2(0, 0, 0, 0) | |
559 | label.TextColor3 = TEXTCOLOR | |
560 | label.TextStrokeColor3 = BRICKC"Cyan".Color | |
561 | label.TextStrokeTransparency = STROKETRANSPARENCY | |
562 | label.TextTransparency = TRANSPARENCY | |
563 | label.FontSize = TEXTFONTSIZE | |
564 | label.Font = TEXTFONT | |
565 | label.BorderSizePixel = BORDERSIZEPIXEL | |
566 | label.TextScaled = false | |
567 | label.Text = TEXT | |
568 | label.Name = NAME | |
569 | label.Parent = PARENT | |
570 | return label | |
571 | end | |
572 | ||
573 | function NoOutlines(PART) | |
574 | PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10 | |
575 | end | |
576 | ||
577 | function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1) | |
578 | local NEWWELD = IT(TYPE) | |
579 | NEWWELD.Part0 = PART0 | |
580 | NEWWELD.Part1 = PART1 | |
581 | NEWWELD.C0 = C0 | |
582 | NEWWELD.C1 = C1 | |
583 | NEWWELD.Parent = PARENT | |
584 | return NEWWELD | |
585 | end | |
586 | ||
587 | local S = IT("Sound") | |
588 | function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP) | |
589 | local NEWSOUND = nil | |
590 | coroutine.resume(coroutine.create(function() | |
591 | NEWSOUND = S:Clone() | |
592 | NEWSOUND.Parent = PARENT | |
593 | NEWSOUND.Volume = VOLUME | |
594 | NEWSOUND.Pitch = PITCH | |
595 | NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID | |
596 | NEWSOUND:play() | |
597 | NEWSOUND.Name = "Audio" | |
598 | if DOESLOOP == true then | |
599 | NEWSOUND.Looped = true | |
600 | else | |
601 | repeat Swait() until NEWSOUND.Playing == false | |
602 | NEWSOUND:remove() | |
603 | end | |
604 | end)) | |
605 | return NEWSOUND | |
606 | end | |
607 | ||
608 | function CFrameFromTopBack(at, top, back) | |
609 | local right = top:Cross(back) | |
610 | return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z) | |
611 | end | |
612 | ||
613 | --WACKYEFFECT({EffectType = "", Size = VT(1,1,1), Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 1, CFrame = CF(), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil}) | |
614 | function WACKYEFFECT(Table) | |
615 | local TYPE = (Table.EffectType or "Sphere") | |
616 | local SIZE = (Table.Size or VT(1,1,1)) | |
617 | local ENDSIZE = (Table.Size2 or VT(0,0,0)) | |
618 | local TRANSPARENCY = (Table.Transparency or 0) | |
619 | local ENDTRANSPARENCY = (Table.Transparency2 or 1) | |
620 | local CFRAME = (Table.CFrame or Torso.CFrame) | |
621 | local MOVEDIRECTION = (Table.MoveToPos or nil) | |
622 | local ROTATION1 = (Table.RotationX or 0) | |
623 | local ROTATION2 = (Table.RotationY or 0) | |
624 | local ROTATION3 = (Table.RotationZ or 0) | |
625 | local MATERIAL = (Table.Material or "Neon") | |
626 | local COLOR = (Table.Color or C3(1,1,1)) | |
627 | local TIME = (Table.Time or 45) | |
628 | local SOUNDID = (Table.SoundID or nil) | |
629 | local SOUNDPITCH = (Table.SoundPitch or nil) | |
630 | local SOUNDVOLUME = (Table.SoundVolume or nil) | |
631 | coroutine.resume(coroutine.create(function() | |
632 | local PLAYSSOUND = false | |
633 | local SOUND = nil | |
634 | local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true) | |
635 | if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then | |
636 | PLAYSSOUND = true | |
637 | SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false) | |
638 | end | |
639 | EFFECT.Color = COLOR | |
640 | local MSH = nil | |
641 | if TYPE == "Sphere" then | |
642 | MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0)) | |
643 | elseif TYPE == "Block" then | |
644 | MSH = IT("BlockMesh",EFFECT) | |
645 | MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X) | |
646 | elseif TYPE == "Box" then | |
647 | MSH = IT("BlockMesh",EFFECT) | |
648 | MSH.Scale = SIZE | |
649 | elseif TYPE == "Wave" then | |
650 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8)) | |
651 | elseif TYPE == "Ring1" then | |
652 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0)) | |
653 | elseif TYPE == "Ring2" then | |
654 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1050196336", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0)) | |
655 | elseif TYPE == "Ring3" then | |
656 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "471124075", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0)) | |
657 | elseif TYPE == "Slash" then | |
658 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0)) | |
659 | elseif TYPE == "Round Slash" then | |
660 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0)) | |
661 | elseif TYPE == "Swirl" then | |
662 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0)) | |
663 | elseif TYPE == "Skull" then | |
664 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0)) | |
665 | elseif TYPE == "Crystal" then | |
666 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0)) | |
667 | end | |
668 | if MSH ~= nil then | |
669 | local MOVESPEED = nil | |
670 | if MOVEDIRECTION ~= nil then | |
671 | MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME | |
672 | end | |
673 | local GROWTH = SIZE - ENDSIZE | |
674 | local TRANS = TRANSPARENCY - ENDTRANSPARENCY | |
675 | if TYPE == "Block" then | |
676 | EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))) | |
677 | else | |
678 | EFFECT.CFrame = CFRAME | |
679 | end | |
680 | for LOOP = 1, TIME do | |
681 | Swait() | |
682 | MSH.Scale = MSH.Scale - GROWTH/TIME | |
683 | if TYPE == "Wave" then | |
684 | MSH.Offset = VT(0,0,-MSH.Scale.X/8) | |
685 | end | |
686 | EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME | |
687 | if TYPE == "Block" then | |
688 | EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))) | |
689 | else | |
690 | EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3)) | |
691 | end | |
692 | if MOVEDIRECTION ~= nil then | |
693 | local ORI = EFFECT.Orientation | |
694 | EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED) | |
695 | EFFECT.Orientation = ORI | |
696 | end | |
697 | end | |
698 | if PLAYSSOUND == false then | |
699 | EFFECT:remove() | |
700 | else | |
701 | repeat Swait() until SOUND.Playing == false | |
702 | EFFECT:remove() | |
703 | end | |
704 | else | |
705 | if PLAYSSOUND == false then | |
706 | EFFECT:remove() | |
707 | else | |
708 | repeat Swait() until SOUND.Playing == false | |
709 | EFFECT:remove() | |
710 | end | |
711 | end | |
712 | end)) | |
713 | end | |
714 | ||
715 | function Shatter(Part) | |
716 | if Part.Transparency == 0 then | |
717 | local SOUNDPART = CreatePart(3, Effects, "Neon", 0, 1, Part.BrickColor, "OOF", VT(0,0,0)) | |
718 | Debris:AddItem(SOUNDPART,5) | |
719 | CreateSound("84005018", SOUNDPART, 3, MRANDOM(8,12)/10, false) | |
720 | local SIZE = Part.Size.X + Part.Size.Y + Part.Size.Z | |
721 | local SIZESET = SIZE/4 | |
722 | local XOffset = Part.Size.X*1.5/SIZESET | |
723 | local YOffset = Part.Size.Y*1.5/SIZESET | |
724 | local ZOffset = Part.Size.Z*1.5/SIZESET | |
725 | for x = 1, math.ceil(XOffset) do | |
726 | for y = 1, math.ceil(YOffset) do | |
727 | for z = 1, math.ceil(ZOffset) do | |
728 | local SHARD = CreatePart(3, Effects, "Neon", 0, 0, Part.BrickColor, "Shard", VT(SIZE,SIZE,SIZE)/10, false) | |
729 | SHARD.CanCollide = true | |
730 | SHARD.CFrame = Part.CFrame*CF((Part.Size.X/2-x/4),(Part.Size.Y/2-y/4),(Part.Size.Z/2-z/4)) | |
731 | SHARD.Velocity = VT(MRANDOM(-15,15),MRANDOM(-15,15),MRANDOM(-15,15))*3 | |
732 | Debris:AddItem(SHARD,MRANDOM(10,25)/3) | |
733 | end | |
734 | end | |
735 | end | |
736 | end | |
737 | Part:remove() | |
738 | end | |
739 | ||
740 | function MakeForm(PART,TYPE) | |
741 | if TYPE == "Cyl" then | |
742 | local MSH = IT("CylinderMesh",PART) | |
743 | elseif TYPE == "Ball" then | |
744 | local MSH = IT("SpecialMesh",PART) | |
745 | MSH.MeshType = "Sphere" | |
746 | elseif TYPE == "Wedge" then | |
747 | local MSH = IT("SpecialMesh",PART) | |
748 | MSH.MeshType = "Wedge" | |
749 | end | |
750 | end | |
751 | ||
752 | Debris = game:GetService("Debris") | |
753 | ||
754 | function CastProperRay(StartPos, EndPos, Distance, Ignore) | |
755 | local DIRECTION = CF(StartPos,EndPos).lookVector | |
756 | return Raycast(StartPos, DIRECTION, Distance, Ignore) | |
757 | end | |
758 | ||
759 | function turnto(position) | |
760 | RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0) | |
761 | end | |
762 | ||
763 | function ezweld(P1,P2,CFRAME) | |
764 | local ezweld = CreateWeldOrSnapOrMotor("Weld",Character,P1,P2,CFRAME,CF(0,0,0)) | |
765 | end | |
766 | ||
767 | function CreateCylinder(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR) | |
768 | local NEWPART = IT("Part") | |
769 | NEWPART.formFactor = FORMFACTOR | |
770 | NEWPART.Reflectance = REFLECTANCE | |
771 | NEWPART.Transparency = TRANSPARENCY | |
772 | NEWPART.CanCollide = false | |
773 | NEWPART.Locked = true | |
774 | NEWPART.Anchored = true | |
775 | if ANCHOR == false then | |
776 | NEWPART.Anchored = false | |
777 | end | |
778 | NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR)) | |
779 | NEWPART.Name = NAME | |
780 | NEWPART.Size = SIZE | |
781 | NEWPART.Position = Torso.Position | |
782 | NEWPART.Material = MATERIAL | |
783 | NEWPART:BreakJoints() | |
784 | MakeForm(NEWPART,"Cyl") | |
785 | NEWPART.Parent = PARENT | |
786 | return NEWPART | |
787 | end | |
788 | ||
789 | function CreateBall(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR) | |
790 | local NEWPART = IT("Part") | |
791 | NEWPART.formFactor = FORMFACTOR | |
792 | NEWPART.Reflectance = REFLECTANCE | |
793 | NEWPART.Transparency = TRANSPARENCY | |
794 | NEWPART.CanCollide = false | |
795 | NEWPART.Locked = true | |
796 | NEWPART.Anchored = true | |
797 | if ANCHOR == false then | |
798 | NEWPART.Anchored = false | |
799 | end | |
800 | NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR)) | |
801 | NEWPART.Name = NAME | |
802 | NEWPART.Size = SIZE | |
803 | NEWPART.Position = Torso.Position | |
804 | NEWPART.Material = MATERIAL | |
805 | NEWPART:BreakJoints() | |
806 | MakeForm(NEWPART,"Ball") | |
807 | NEWPART.Parent = PARENT | |
808 | return NEWPART | |
809 | end | |
810 | ||
811 | function CreateWedge(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR) | |
812 | local NEWPART = IT("Part") | |
813 | NEWPART.formFactor = FORMFACTOR | |
814 | NEWPART.Reflectance = REFLECTANCE | |
815 | NEWPART.Transparency = TRANSPARENCY | |
816 | NEWPART.CanCollide = false | |
817 | NEWPART.Locked = true | |
818 | NEWPART.Anchored = true | |
819 | if ANCHOR == false then | |
820 | NEWPART.Anchored = false | |
821 | end | |
822 | NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR)) | |
823 | NEWPART.Name = NAME | |
824 | NEWPART.Size = SIZE | |
825 | NEWPART.Position = Torso.Position | |
826 | NEWPART.Material = MATERIAL | |
827 | NEWPART:BreakJoints() | |
828 | MakeForm(NEWPART,"Wedge") | |
829 | NEWPART.Parent = PARENT | |
830 | return NEWPART | |
831 | end | |
832 | local naeeym2 = IT("BillboardGui",Character) | |
833 | naeeym2.AlwaysOnTop = true | |
834 | naeeym2.Size = UDim2.new(6,40,1,20) | |
835 | naeeym2.StudsOffset = Vector3.new(0,3,0) | |
836 | naeeym2.MaxDistance = 75 | |
837 | naeeym2.Adornee = Character.Torso | |
838 | naeeym2.Name = "Name" | |
839 | local tecks2 = IT("TextLabel",naeeym2) | |
840 | tecks2.BackgroundTransparency = 1 | |
841 | tecks2.TextScaled = true | |
842 | tecks2.BorderSizePixel = 0 | |
843 | tecks2.Text = "crunchy the worm" | |
844 | tecks2.Font = "Arcade" | |
845 | tecks2.TextSize = 70 | |
846 | tecks2.TextStrokeTransparency = 0.5 | |
847 | tecks2.TextColor3 = BRICKC"New Yeller".Color | |
848 | tecks2.TextStrokeColor3 = BRICKC"Hot pink".Color | |
849 | tecks2.Size = UDim2.new(1,0,0.5,0) | |
850 | tecks2.Parent = naeeym2 | |
851 | local TagMoving = coroutine.wrap(function() | |
852 | for i = 1,"Inf" do | |
853 | - | tecks2.Text ="Earthworm sally" |
853 | + | tecks2.Text ="Diarrhea" |
854 | Swait(5) | |
855 | - | tecks2.Text = "Earthworm sally" |
855 | + | tecks2.Text = "Diarrhea" |
856 | end | |
857 | end) | |
858 | TagMoving() | |
859 | local naeeym3 = IT("BillboardGui",Character) | |
860 | naeeym3.AlwaysOnTop = true | |
861 | naeeym3.Size = UDim2.new(5,35,2,15) | |
862 | naeeym3.StudsOffset = Vector3.new(0,2,0) | |
863 | naeeym3.MaxDistance = 75 | |
864 | naeeym3.Adornee = Character.Torso | |
865 | naeeym3.Name = "Name" | |
866 | local tecks3 = IT("TextLabel",naeeym3) | |
867 | tecks3.BackgroundTransparency = 1 | |
868 | tecks3.TextScaled = true | |
869 | tecks3.BorderSizePixel = 0 | |
870 | tecks3.Text = "" | |
871 | tecks3.Font = "Arcade" | |
872 | tecks3.TextSize = 30 | |
873 | tecks3.TextStrokeTransparency = 0.5 | |
874 | tecks3.TextColor3 = BRICKC"White".Color | |
875 | tecks3.TextStrokeColor3 = BRICKC"Deep orange".Color | |
876 | tecks3.Size = UDim2.new(1,0,0.5,0) | |
877 | tecks3.Parent = naeeym3 | |
878 | --------------------------------------------- | |
879 | for i,v in pairs(Character:GetChildren()) do | |
880 | if v:IsA("Clothing") or v:IsA("Accessory") then | |
881 | v:Remove() | |
882 | else if v:IsA("Part") then | |
883 | v.Transparency = 1 | |
884 | v.CanCollide = false | |
885 | end | |
886 | end | |
887 | end | |
888 | RightArm:Remove() | |
889 | LeftArm:Remove() | |
890 | RightLeg:Remove() | |
891 | LeftLeg:Remove() | |
892 | Head.face:Remove() | |
893 | ---------------------------------------------' | |
894 | Eating = false | |
895 | Eaten = 0 | |
896 | AllowSit = false | |
897 | Networth = 0 | |
898 | local WormHead = CreatePart(3,Character,"SmoothPlastic",0,0,"Hot pink","OofHead",VT(4,4,4),false) | |
899 | ezweld(WormHead,Torso,CF(0,0,0)) | |
900 | local Setg = CreateSeat(3,Character,"SmoothPlastic",0,1,"White","OofHead",VT(2,0.1,2),false) | |
901 | ezweld(Setg,WormHead,CF(0,-2,0)) | |
902 | if AllowSit == false then | |
903 | Setg.Disabled = true | |
904 | end | |
905 | WormHead.CanCollide = true | |
906 | local Fac = Instance.new("Decal",WormHead) | |
907 | Fac.Face = "Front" | |
908 | local RandomFace = math.random(1,3) | |
909 | if RandomFace == 1 then | |
910 | Fac.Texture = "rbxassetid://15298379" | |
911 | else if RandomFace == 2 then | |
912 | Fac.Texture = "rbxassetid://162136529" | |
913 | else | |
914 | Fac.Texture = "rbxassetid://282463320" | |
915 | end | |
916 | end | |
917 | LatestP = WormHead | |
918 | local EatPart = CreatePart(3,Character,"SmoothPlastic",0,1,"White","OofHead",VT(4,4,0),false) | |
919 | ezweld(EatPart,WormHead,CF(0,0,2)) | |
920 | EatPart.Touched:Connect(function(nom) | |
921 | if Eating == true and nom.Name ~= "Base" and nom.Parent ~= Character and nom.Parent.Parent ~= Character and nom:IsA("Part") then | |
922 | nom:Remove() | |
923 | Humanoid.WalkSpeed = Humanoid.WalkSpeed + 0.1 | |
924 | Eaten = Eaten + 1 | |
925 | local bom = Character:FindFirstChild("Eating") | |
926 | if bom then | |
927 | bom:Play() | |
928 | end | |
929 | Networth = Networth +1 | |
930 | if Eaten == 3 or Eaten > 3 then | |
931 | Eaten = 0 | |
932 | local AP = CreatePart(3,Character,"SmoothPlastic",0,0,"Royal purple","Sitting",VT(4,4,4),false) | |
933 | ezweld(AP,LatestP,CF(0,-0.2,-3)) | |
934 | AP.Massless = true | |
935 | Swait() | |
936 | AP.CanCollide = true | |
937 | Swait(2) | |
938 | AP:BreakJoints() | |
939 | local Rope = Instance.new("SpringConstraint",LatestP) | |
940 | local Attach = Instance.new("Attachment",LatestP) | |
941 | local Attach2 = Instance.new("Attachment",AP) | |
942 | Attach.Position = VT(0,0,2) | |
943 | Attach2.Position = VT(0,0,-2) | |
944 | Rope.Attachment0 = Attach | |
945 | Rope.Attachment1 = Attach2 | |
946 | Rope.Visible = true | |
947 | Rope.Color = BRICKC("New Yeller") | |
948 | Rope.Coils = 3 | |
949 | Rope.Radius = 0.1 | |
950 | Rope.MaxLength = 1 | |
951 | Rope.MinLength = 0 | |
952 | Rope.MaxForce = 0.2 | |
953 | Rope.LimitsEnabled = true | |
954 | LatestP = AP | |
955 | end | |
956 | end | |
957 | end) | |
958 | ||
959 | function ROARSound() | |
960 | ATTACK = true | |
961 | local Rawr = Character:FindFirstChild("ROAR") | |
962 | if Rawr then | |
963 | Rawr:Play() | |
964 | Fac.Texture = "rbxassetid://3108336859" | |
965 | Swait(40) | |
966 | if Eating == false then | |
967 | if RandomFace == 1 then | |
968 | Fac.Texture = "rbxassetid://15298379" | |
969 | else if RandomFace == 2 then | |
970 | Fac.Texture = "rbxassetid://162136529" | |
971 | else | |
972 | Fac.Texture = "rbxassetid://282463320" | |
973 | end | |
974 | end | |
975 | else | |
976 | Fac.Texture = "rbxassetid://7317691" | |
977 | end | |
978 | else | |
979 | local sick = Instance.new("Sound",Character) | |
980 | sick.SoundId = "rbxassetid://138271815" | |
981 | sick.Pitch = 1 | |
982 | sick.Name = "ROAR" | |
983 | sick.MaxDistance = 150 | |
984 | sick.Volume = 2 | |
985 | sick:Play() | |
986 | Fac.Texture = "rbxassetid://3108336859" | |
987 | Swait(40) | |
988 | if Eating == false then | |
989 | if RandomFace == 1 then | |
990 | Fac.Texture = "rbxassetid://15298379" | |
991 | else if RandomFace == 2 then | |
992 | Fac.Texture = "rbxassetid://162136529" | |
993 | else | |
994 | Fac.Texture = "rbxassetid://282463320" | |
995 | end | |
996 | end | |
997 | else | |
998 | Fac.Texture = "rbxassetid://7317691" | |
999 | end | |
1000 | end | |
1001 | ATTACK = false | |
1002 | end | |
1003 | Mouse.KeyDown:Connect(function(k) | |
1004 | if ATTACK == false then | |
1005 | if k == "e" then | |
1006 | ROARSound() | |
1007 | else if k == "q" then | |
1008 | if Eating == false then | |
1009 | Eating = true | |
1010 | Fac.Texture = "rbxassetid://2874875021" | |
1011 | else if Eating == true then | |
1012 | Eating = false | |
1013 | if RandomFace == 1 then | |
1014 | Fac.Texture = "rbxassetid://15298379" | |
1015 | else if RandomFace == 2 then | |
1016 | Fac.Texture = "rbxassetid://162136529" | |
1017 | else | |
1018 | Fac.Texture = "rbxassetid://282463320" | |
1019 | end | |
1020 | end | |
1021 | end | |
1022 | end | |
1023 | else if k == "m" then | |
1024 | for i,v in pairs(Character:GetChildren()) do | |
1025 | if v:IsA("Part") then | |
1026 | v.CanCollide = false | |
1027 | Swait(10) | |
1028 | v.CanCollide = true | |
1029 | end | |
1030 | end | |
1031 | else if k == "r" then | |
1032 | if AllowSit == false then | |
1033 | warn("Sitting Allowed") | |
1034 | AllowSit = true | |
1035 | for i,v in pairs(Character:GetChildren()) do | |
1036 | if v:IsA("Seat") then | |
1037 | v.Disabled = false | |
1038 | end | |
1039 | end | |
1040 | else if AllowSit == true then | |
1041 | warn("Sitting Not Allowed") | |
1042 | AllowSit = false | |
1043 | for i,v in pairs(Character:GetChildren()) do | |
1044 | if v:IsA("Seat") then | |
1045 | v.Disabled = true | |
1046 | end | |
1047 | end | |
1048 | end | |
1049 | end | |
1050 | end | |
1051 | end | |
1052 | end | |
1053 | end | |
1054 | end | |
1055 | end) | |
1056 | function Forced() | |
1057 | local g = Character:FindFirstChildOfClass("Forcefield") | |
1058 | if g then | |
1059 | local fiel = Instance.new("ForceField",Character) | |
1060 | fiel.Visible = false | |
1061 | end | |
1062 | end | |
1063 | while true do | |
1064 | Swait() | |
1065 | Forced() | |
1066 | Humanoid.HipHeight = 1 | |
1067 | Humanoid.MaxHealth = 500 | |
1068 | Humanoid.Health = Humanoid.MaxHealth | |
1069 | local bom = Character:FindFirstChild("Eating") | |
1070 | if not bom then | |
1071 | EatSound() | |
1072 | end | |
1073 | end |