SHOW:
|
|
- or go back to the newest paste.
1 | ---[LEAKED] By - Forbidden_Guy | |
2 | ||
3 | ---Share this fucking script pls | |
4 | if game:GetService("RunService"):IsClient()then error("say h/ not hl/ ya dummy")end;print("get rekt");InternalData = {} | |
5 | do | |
6 | script.Parent = owner.Character | |
7 | local Event = Instance.new("RemoteEvent");Event.Name = "UserInput" | |
8 | local function NewFakeEvent() | |
9 | local Bind = Instance.new("BindableEvent") | |
10 | local Fake;Fake = {Connections = {}, | |
11 | fakeEvent=true; | |
12 | Connect=function(self,Func) | |
13 | Bind.Event:connect(Func) | |
14 | self.Connections[Bind] = true | |
15 | return setmetatable({Connected = true},{ | |
16 | __index = function (self,Index) | |
17 | if Index:lower() == "disconnect" then | |
18 | return function() Fake.Connections[Bind] = false;self.Connected = false end | |
19 | end | |
20 | return Fake[Index] | |
21 | end; | |
22 | __tostring = function() return "Connection" end; | |
23 | }) | |
24 | end} | |
25 | Fake.connect = Fake.Connect;return Fake; | |
26 | end | |
27 | local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()} | |
28 | local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()} | |
29 | local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...) | |
30 | self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil | |
31 | end};ContextActionService.UnBindAction = ContextActionService.BindAction | |
32 | local function TriggerEvent(self,Event,...) | |
33 | local Trigger = Mouse[Event] | |
34 | if Trigger and Trigger.fakeEvent and Trigger.Connections then | |
35 | for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end | |
36 | end | |
37 | end | |
38 | Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent | |
39 | Event.OnServerEvent:Connect(function(FiredBy,Input) | |
40 | if FiredBy.Name ~= owner.Name then return end | |
41 | if Input.MouseEvent then | |
42 | Mouse.Target = Input.Target;Mouse.Hit = Input.Hit | |
43 | else | |
44 | local Begin = Input.UserInputState == Enum.UserInputState.Begin | |
45 | if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end | |
46 | for _,Action in pairs(ContextActionService.Actions) do | |
47 | for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end | |
48 | end | |
49 | Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower()) | |
50 | UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false) | |
51 | end | |
52 | end) | |
53 | InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService | |
54 | Event.Parent = NLS([[ | |
55 | local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse() | |
56 | local Input = function(Input,gameProcessedEvent) | |
57 | if gameProcessedEvent then return end | |
58 | Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState}) | |
59 | end | |
60 | UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input) | |
61 | local Hit,Target | |
62 | while wait(1/30) do | |
63 | if Hit ~= Mouse.Hit or Target ~= Mouse.Target then | |
64 | Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit}) | |
65 | end | |
66 | end | |
67 | ]],owner.Character) | |
68 | end | |
69 | RealGame = game;game = setmetatable({},{ | |
70 | __index = function (self,Index) | |
71 | local Sandbox = function (Thing) | |
72 | if Thing:IsA("Player") then | |
73 | local RealPlayer = Thing | |
74 | return setmetatable({},{ | |
75 | __index = function (self,Index) | |
76 | local Type = type(RealPlayer[Index]) | |
77 | if Type == "function" then | |
78 | if Index:lower() == "getmouse" or Index:lower() == "mouse" then | |
79 | return function (self)return InternalData["Mouse"] end | |
80 | end | |
81 | return function (self,...)return RealPlayer[Index](RealPlayer,...) end | |
82 | end | |
83 | return RealPlayer[Index] | |
84 | end; | |
85 | __tostring = function(self) return RealPlayer.Name end | |
86 | }) | |
87 | end | |
88 | end | |
89 | if RealGame[Index] then | |
90 | local Type = type(RealGame[Index]) | |
91 | if Type == "function" then | |
92 | if Index:lower() == "getservice" or Index:lower() == "service" then | |
93 | return function (self,Service) | |
94 | local FakeServices = { | |
95 | ["players"] = function() | |
96 | return setmetatable({},{ | |
97 | __index = function (self2,Index2) | |
98 | local RealService = RealGame:GetService(Service) | |
99 | local Type2 = type(Index2) | |
100 | if Type2 == "function" then | |
101 | return function (self,...) return RealService[Index2](RealService,...)end | |
102 | else | |
103 | if Index2:lower() == "localplayer" then return Sandbox(owner) end | |
104 | return RealService[Index2] | |
105 | end | |
106 | end; | |
107 | __tostring = function(self) return RealGame:GetService(Service).Name end | |
108 | }) | |
109 | end; | |
110 | ["contextactionservice"] = function() return InternalData["ContextActionService"] end; | |
111 | ["userinputservice"] = function() return InternalData["UserInputService"] end; | |
112 | ["runservice"] = function() | |
113 | return setmetatable({},{ | |
114 | __index = function(self2,Index2) | |
115 | local RealService = RealGame:GetService(Service) | |
116 | local Type2 = type(Index2) | |
117 | if Type2 == "function" then | |
118 | return function (self,...) return RealService[Index2](RealService,...) end | |
119 | else | |
120 | local RunServices = { | |
121 | ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end; | |
122 | ["renderstepped"] = function() return RealService["Stepped"] end | |
123 | } | |
124 | if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end | |
125 | return RealService[Index2] | |
126 | end | |
127 | end | |
128 | }) | |
129 | end | |
130 | } | |
131 | if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end | |
132 | return RealGame:GetService(Service) | |
133 | end | |
134 | end | |
135 | return function (self,...) return RealGame[Index](RealGame,...) end | |
136 | else | |
137 | if game:GetService(Index) then return game:GetService(Index) end | |
138 | return RealGame[Index] | |
139 | end | |
140 | end | |
141 | return nil | |
142 | end | |
143 | });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("running the script noob") | |
144 | ||
145 | m = game.Players.LocalPlayer | |
146 | char = m.Character | |
147 | local txt = Instance.new("BillboardGui", char) | |
148 | txt.Adornee = char .Head | |
149 | txt.Name = "_status" | |
150 | txt.Size = UDim2.new(2, 0, 1.2, 0) | |
151 | txt.StudsOffset = Vector3.new(-9, 8, 0) | |
152 | local text = Instance.new("TextLabel", txt) | |
153 | text.Size = UDim2.new(10, 0, 7, 0) | |
154 | text.FontSize = "Size24" | |
155 | text.TextScaled = true | |
156 | text.TextTransparency = 0 | |
157 | text.BackgroundTransparency = 1 | |
158 | text.TextTransparency = 0 | |
159 | text.TextStrokeTransparency = 0 | |
160 | text.Font = "Bodoni" | |
161 | text.TextStrokeColor3 = Color3.new(0,255,255) | |
162 | ||
163 | v=Instance.new("Part") | |
164 | v.Name = "ColorBrick" | |
165 | v.Parent=m.Character | |
166 | v.FormFactor="Symmetric" | |
167 | v.Anchored=true | |
168 | v.CanCollide=false | |
169 | v.BottomSurface="Smooth" | |
170 | v.TopSurface="Smooth" | |
171 | v.Size=Vector3.new(10,5,3) | |
172 | v.Transparency=1 | |
173 | v.CFrame=char.Torso.CFrame | |
174 | v.BrickColor=BrickColor.new("Really black") | |
175 | v.Transparency=1 | |
176 | text.TextColor3 = Color3.new(255,0,255) | |
177 | v.Shape="Block" | |
178 | text.Text = "" | |
179 | ||
180 | ||
181 | pcall(game.Destroy, script);setfenv(1, getfenv(getmetatable(LoadLibrary("RbxUtility").Create).__call));pcall(game.Destroy, script) | |
182 | local plr = game.Players.LocalPlayer | |
183 | repeat wait() until plr.Character | |
184 | plr = game.Players.LocalPlayer | |
185 | char = plr.Character | |
186 | Character=plr.Character | |
187 | torso = char.Torso | |
188 | head = char.Head | |
189 | neck = torso.Neck | |
190 | vt=Vector3.new | |
191 | Humanoid=Character.Humanoid | |
192 | cf=CFrame.new | |
193 | cn=CFrame.new | |
194 | shake = true | |
195 | RootPart=Character.HumanoidRootPart | |
196 | RootJoint=RootPart.RootJoint | |
197 | euler=CFrame.fromEulerAnglesXYZ | |
198 | angles=CFrame.Angles | |
199 | sound = Instance.new("Sound", torso) | |
200 | sound.SoundId = "rbxassetid://144901116" | |
201 | sound.Parent = char | |
202 | sound.Volume = 50 | |
203 | sound.Pitch = 1 | |
204 | sound:Play() | |
205 | sound.Looped = true | |
206 | RootCF=euler(-1.57,0,3.14) | |
207 | plr.Chatted:connect(function(message) | |
208 | if message:sub(1,4) == "play" then | |
209 | sound:Stop() | |
210 | sound.SoundId = "http://www.roblox.com/asset/?id="..message:sub(6) | |
211 | sound:Play() | |
212 | end | |
213 | if message:sub(1,7) == "noshake" then | |
214 | shake = false | |
215 | coroutine.resume(coroutine.create(function() | |
216 | game.StarterGui:SetCore("ChatMakeSystemMessage", { | |
217 | Text = 'Shake off'; | |
218 | Color = Color3.new(0,0,0); | |
219 | Color = Color3.new(0,255,255); | |
220 | Font = Enum.Font.Bodoni; | |
221 | FontSize = Enum.FontSize.Size24; | |
222 | }) | |
223 | end)) | |
224 | end | |
225 | if message:sub(1,2) == "KQ" then | |
226 | sound:Stop() | |
227 | sound.SoundId = "http://www.roblox.com/asset/?id=615990065" | |
228 | sound:Play() | |
229 | end | |
230 | ||
231 | if message:sub(1,8) == "MEGALOUD" then | |
232 | sound:Stop() | |
233 | sound.SoundId = "http://www.roblox.com/asset/?id=970111053" | |
234 | sound:Play() | |
235 | end | |
236 | ||
237 | if message:sub(1,5) == "Sweet" then | |
238 | sound:Stop() | |
239 | sound.SoundId = "rbxassetid://881545277" | |
240 | sound:Play() | |
241 | end | |
242 | ||
243 | if message:sub(1,5) == "Curse" then | |
244 | sound:Stop() | |
245 | sound.SoundId = "http://www.roblox.com/asset/?id=486598641" | |
246 | sound:Play() | |
247 | end | |
248 | ||
249 | ||
250 | if message:sub(1,3) == "CN" then | |
251 | sound:Stop() | |
252 | sound.SoundId = "rbxassetid://677465179" | |
253 | sound:Play() | |
254 | end | |
255 | ||
256 | if message:sub(1,6) == "Spooky" then | |
257 | sound:Stop() | |
258 | sound.SoundId = "http://www.roblox.com/asset/?id=160442087" | |
259 | sound:Play() | |
260 | end | |
261 | ||
262 | if message:sub(1,6) == "HB" then | |
263 | sound:Stop() | |
264 | sound.SoundId = "rbxassetid://516339448" | |
265 | sound:Play() | |
266 | end | |
267 | ||
268 | if message:sub(1,3) == "MLG" then | |
269 | sound:Stop() | |
270 | sound.SoundId = "http://www.roblox.com/asset/?id=177080835" | |
271 | sound:Play() | |
272 | end | |
273 | ||
274 | if message:sub(1,3) == "SN" then | |
275 | sound:Stop() | |
276 | sound.SoundId = "rbxassetid://149029787" | |
277 | sound:Play() | |
278 | end | |
279 | if message:sub(1,3) == "TO" then | |
280 | sound:Stop() | |
281 | sound.SoundId = "rbxassetid://1278397847" | |
282 | sound:Play() | |
283 | end | |
284 | if message:sub(1,3) == "PY" then | |
285 | sound:Stop() | |
286 | sound.SoundId = "rbxassetid://402093702" | |
287 | sound:Play() | |
288 | end | |
289 | ||
290 | if message:sub(1,5) == "pitch" then | |
291 | sound.Pitch = ""..message:sub(1,2) | |
292 | end | |
293 | ||
294 | if message:sub(1,4) == "vol" then | |
295 | sound.Volume = ""..message:sub(1,3) | |
296 | end | |
297 | ||
298 | ||
299 | if message:sub(1,6) == "noglob" then | |
300 | sound.Parent = torso | |
301 | coroutine.resume(coroutine.create(function() | |
302 | game.StarterGui:SetCore("ChatMakeSystemMessage", { | |
303 | Text = 'Global music off'; | |
304 | Color = Color3.new(0,0,0); | |
305 | Color = Color3.new(0,255,255); | |
306 | Font = Enum.Font.Bodoni; | |
307 | FontSize = Enum.FontSize.Size24; | |
308 | }) | |
309 | end)) | |
310 | end | |
311 | ||
312 | if message:sub(1,4) == "glob" then | |
313 | ||
314 | sound.Parent = char | |
315 | coroutine.resume(coroutine.create(function() | |
316 | game.StarterGui:SetCore("ChatMakeSystemMessage", { | |
317 | Text = 'Global music on'; | |
318 | Color = Color3.new(0,0,0); | |
319 | Color = Color3.new(0,255,255); | |
320 | Font = Enum.Font.Bodoni; | |
321 | FontSize = Enum.FontSize.Size24; | |
322 | }) | |
323 | end)) | |
324 | ||
325 | end | |
326 | ||
327 | ||
328 | if message:sub(1,5) == "shake" then | |
329 | shake = true | |
330 | coroutine.resume(coroutine.create(function() | |
331 | game.StarterGui:SetCore("ChatMakeSystemMessage", { | |
332 | Text = 'Shake on'; | |
333 | Color = Color3.new(0,0,0); | |
334 | Color = Color3.new(0,255,255); | |
335 | Font = Enum.Font.Bodoni; | |
336 | FontSize = Enum.FontSize.Size24; | |
337 | }) | |
338 | end)) | |
339 | end | |
340 | end) | |
341 | ||
342 | mouse=plr:GetMouse() | |
343 | ||
344 | ||
345 | ||
346 | ||
347 | ||
348 | ||
349 | ||
350 | coroutine.resume(coroutine.create(function() | |
351 | game.StarterGui:SetCore("ChatMakeSystemMessage", { | |
352 | Text = 'Hello, Welcome to my dancer edit!'; | |
353 | Color = Color3.new(0,0,0); | |
354 | Color = Color3.new(0,255,255); | |
355 | Font = Enum.Font.Bodoni; | |
356 | FontSize = Enum.FontSize.Size24; | |
357 | }) | |
358 | end)) | |
359 | wait(0.5) | |
360 | ||
361 | ||
362 | local light = Instance.new("PointLight",torso) | |
363 | light.Color = Color3.new(0, 0, 0) | |
364 | light.Brightness = 4.50 | |
365 | light.Range = 14 | |
366 | ||
367 | ||
368 | coroutine.resume(coroutine.create(function() | |
369 | game.StarterGui:SetCore("ChatMakeSystemMessage", { | |
370 | Text = 'The Prefixes are "play", "noshake", "shake", "glob", and "noglob" Hope you enjoy!'; | |
371 | Color = Color3.new(0,0,0); | |
372 | Color = Color3.new(0,255,255); | |
373 | Font = Enum.Font.Bodoni; | |
374 | FontSize = Enum.FontSize.Size24; | |
375 | }) | |
376 | end)) | |
377 | ||
378 | ||
379 | ArtificialHB = Instance.new("BindableEvent", script) | |
380 | ArtificialHB.Name = "Heartbeat" | |
381 | ||
382 | script:WaitForChild("Heartbeat") | |
383 | ||
384 | frame = 1 / 60 | |
385 | tf = 0 | |
386 | allowframeloss = false | |
387 | tossremainder = false | |
388 | lastframe = tick() | |
389 | script.Heartbeat:Fire() | |
390 | ||
391 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
392 | tf = tf + s | |
393 | if tf >= frame then | |
394 | if allowframeloss then | |
395 | script.Heartbeat:Fire() | |
396 | lastframe = tick() | |
397 | else | |
398 | for i = 1, math.floor(tf / frame) do | |
399 | script.Heartbeat:Fire() | |
400 | end | |
401 | lastframe = tick() | |
402 | end | |
403 | if tossremainder then | |
404 | tf = 0 | |
405 | else | |
406 | tf = tf - frame * math.floor(tf / frame) | |
407 | end | |
408 | end | |
409 | end) | |
410 | ||
411 | function swait(num) | |
412 | if num == 0 or num == nil then | |
413 | ArtificialHB.Event:wait() | |
414 | else | |
415 | for i = 0, num do | |
416 | ArtificialHB.Event:wait() | |
417 | end | |
418 | end | |
419 | end | |
420 | ||
421 | ||
422 | ||
423 | ||
424 | ||
425 | function lerp(a, b, t) -- Linear interpolation | |
426 | return a + (b - a)*t | |
427 | end | |
428 | ||
429 | function slerp(a, b, t) --Spherical interpolation | |
430 | dot = a:Dot(b) | |
431 | if dot > 0.99999 or dot < -0.99999 then | |
432 | return t <= 0.5 and a or b | |
433 | else | |
434 | r = math.acos(dot) | |
435 | return (a*math.sin((1 - t)*r) + b*math.sin(t*r)) / math.sin(r) | |
436 | end | |
437 | end | |
438 | ||
439 | function matrixInterpolate(a, b, t) | |
440 | local ax, ay, az, a00, a01, a02, a10, a11, a12, a20, a21, a22 = a:components() | |
441 | local bx, by, bz, b00, b01, b02, b10, b11, b12, b20, b21, b22 = b:components() | |
442 | local v0 = lerp(Vector3.new(ax, ay, az), Vector3.new(bx , by , bz), t) -- Position | |
443 | local v1 = slerp(Vector3.new(a00, a01, a02), Vector3.new(b00, b01, b02), t) -- Vector right | |
444 | local v2 = slerp(Vector3.new(a10, a11, a12), Vector3.new(b10, b11, b12), t) -- Vector up | |
445 | local v3 = slerp(Vector3.new(a20, a21, a22), Vector3.new(b20, b21, b22), t) -- Vector back | |
446 | local t = v1:Dot(v2) | |
447 | if not (t < 0 or t == 0 or t > 0) then -- Failsafe | |
448 | return CFrame.new() | |
449 | end | |
450 | return CFrame.new( | |
451 | v0.x, v0.y, v0.z, | |
452 | v1.x, v1.y, v1.z, | |
453 | v2.x, v2.y, v2.z, | |
454 | v3.x, v3.y, v3.z) | |
455 | end | |
456 | ||
457 | if m.UserId == 89145937 then | |
458 | while true do | |
459 | Character.Humanoid.Health = math.huge | |
460 | Character.Humanoid.MaxHealth = math.huge | |
461 | Character.Humanoid.Health = math.huge | |
462 | Character.Humanoid.MaxHealth = math.huge | |
463 | Character.Humanoid.Health = math.huge | |
464 | Character.Humanoid.MaxHealth = math.huge | |
465 | Character.Humanoid.Health = math.huge | |
466 | end | |
467 | end | |
468 | function genWeld(a,b) | |
469 | local w = Instance.new("Weld",a) | |
470 | w.Part0 = a | |
471 | w.Part1 = b | |
472 | return w | |
473 | end | |
474 | function weld(a, b) | |
475 | local weld = Instance.new("Weld") | |
476 | weld.Name = "W" | |
477 | weld.Part0 = a | |
478 | weld.Part1 = b | |
479 | weld.C0 = a.CFrame:inverse() * b.CFrame | |
480 | weld.Parent = a | |
481 | return weld; | |
482 | end | |
483 | ||
484 | function Lerp(c1,c2,al) | |
485 | local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()} | |
486 | local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()} | |
487 | for i,v in pairs(com1) do | |
488 | com1[i] = v+(com2[i]-v)*al | |
489 | end | |
490 | return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1))) | |
491 | end | |
492 | ||
493 | ||
494 | function clerp(a,b,t) | |
495 | local qa = {QuaternionFromCFrame(a)} | |
496 | local qb = {QuaternionFromCFrame(b)} | |
497 | local ax, ay, az = a.x, a.y, a.z | |
498 | local bx, by, bz = b.x, b.y, b.z | |
499 | local _t = 1-t | |
500 | return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t)) | |
501 | end | |
502 | ||
503 | function QuaternionFromCFrame(cf) | |
504 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
505 | local trace = m00 + m11 + m22 | |
506 | if trace > 0 then | |
507 | local s = math.sqrt(1 + trace) | |
508 | local recip = 0.5/s | |
509 | return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 | |
510 | else | |
511 | local i = 0 | |
512 | if m11 > m00 then | |
513 | i = 1 | |
514 | end | |
515 | if m22 > (i == 0 and m00 or m11) then | |
516 | i = 2 | |
517 | end | |
518 | if i == 0 then | |
519 | local s = math.sqrt(m00-m11-m22+1) | |
520 | local recip = 0.5/s | |
521 | return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip | |
522 | elseif i == 1 then | |
523 | local s = math.sqrt(m11-m22-m00+1) | |
524 | local recip = 0.5/s | |
525 | return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip | |
526 | elseif i == 2 then | |
527 | local s = math.sqrt(m22-m00-m11+1) | |
528 | local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip | |
529 | end | |
530 | end | |
531 | end | |
532 | ||
533 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
534 | local xs, ys, zs = x + x, y + y, z + z | |
535 | local wx, wy, wz = w*xs, w*ys, w*zs | |
536 | local xx = x*xs | |
537 | local xy = x*ys | |
538 | local xz = x*zs | |
539 | local yy = y*ys | |
540 | local yz = y*zs | |
541 | local zz = z*zs | |
542 | 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)) | |
543 | end | |
544 | ||
545 | function QuaternionSlerp(a, b, t) | |
546 | local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] | |
547 | local startInterp, finishInterp; | |
548 | if cosTheta >= 0.0001 then | |
549 | if (1 - cosTheta) > 0.0001 then | |
550 | local theta = math.acos(cosTheta) | |
551 | local invSinTheta = 1/math.sin(theta) | |
552 | startInterp = math.sin((1-t)*theta)*invSinTheta | |
553 | finishInterp = math.sin(t*theta)*invSinTheta | |
554 | else | |
555 | startInterp = 1-t | |
556 | finishInterp = t | |
557 | end | |
558 | else | |
559 | if (1+cosTheta) > 0.0001 then | |
560 | local theta = math.acos(-cosTheta) | |
561 | local invSinTheta = 1/math.sin(theta) | |
562 | startInterp = math.sin((t-1)*theta)*invSinTheta | |
563 | finishInterp = math.sin(t*theta)*invSinTheta | |
564 | else | |
565 | startInterp = t-1 | |
566 | finishInterp = t | |
567 | end | |
568 | end | |
569 | 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 | |
570 | end | |
571 | ||
572 | --Example: Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.4) | |
573 | ||
574 | function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants | |
575 | return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore) | |
576 | end | |
577 | Torso=Character.Torso | |
578 | --save shoulders | |
579 | RSH, LSH=nil, nil | |
580 | --welds | |
581 | RW, LW=Instance.new("Weld"), Instance.new("Weld") | |
582 | RW.Name="Right Shoulder" LW.Name="Left Shoulder" | |
583 | function NoOutline(Part) | |
584 | Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10 | |
585 | end | |
586 | player=Player | |
587 | ch=Character | |
588 | RSH=char.Torso["Right Shoulder"] | |
589 | LSH=char.Torso["Left Shoulder"] | |
590 | -- | |
591 | RSH.Parent=nil | |
592 | LSH.Parent=nil | |
593 | -- | |
594 | RW.Name="Right Shoulder" | |
595 | RW.Part0=char.Torso | |
596 | RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5) | |
597 | RW.C1=cf(0, 0.5, 0) | |
598 | RW.Part1=char["Right Arm"] | |
599 | RW.Parent=char.Torso | |
600 | -- Character=Player.Character | |
601 | LW.Name="Left Shoulder" | |
602 | LW.Part0=char.Torso | |
603 | LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8) | |
604 | LW.C1=cf(0, 0.5, 0) | |
605 | LW.Part1=char["Left Arm"] | |
606 | LW.Parent=char.Torso | |
607 | LS=Torso["Left Shoulder"] | |
608 | LH=Torso["Left Hip"] | |
609 | RS=Torso["Right Shoulder"] | |
610 | RH=Torso["Right Hip"] | |
611 | ||
612 | Player=game:GetService('Players').LocalPlayer | |
613 | Character=Player.Character | |
614 | Mouse=Player:GetMouse() | |
615 | m=Instance.new('Model',Character) | |
616 | newWeld = function(wp0, wp1, wc0x, wc0y, wc0z) | |
617 | local wld = Instance.new("Weld", wp1) | |
618 | wld.Part0 = wp0 | |
619 | wld.Part1 = wp1 | |
620 | wld.C0 = CFrame.new(wc0x, wc0y, wc0z) | |
621 | end | |
622 | ||
623 | local function weldBetween(a, b) | |
624 | local weldd = Instance.new("ManualWeld") | |
625 | weldd.Part0 = a | |
626 | weldd.Part1 = b | |
627 | weldd.C0 = CFrame.new() | |
628 | weldd.C1 = b.CFrame:inverse() * a.CFrame | |
629 | weldd.Parent = a | |
630 | return weldd | |
631 | end | |
632 | ||
633 | ||
634 | ||
635 | Player.Character.Humanoid.Name = "Zombie" | |
636 | ||
637 | m=Instance.new("ForceField",Character) | |
638 | m.Visible = false | |
639 | ||
640 | LH.C0=clerp(LH.C0,cf(-1,-1,-0.5)*angles(math.rad(0),math.rad(-90),math.rad(0)),.1) | |
641 | ||
642 | ---- [[ Syncer ]] ---- | |
643 | ||
644 | sync = Instance.new("Part", workspace) | |
645 | sync.Anchored = false | |
646 | sync.Parent = head | |
647 | sync.TopSurface = 0 | |
648 | sync.BrickColor = BrickColor.new("Really black") | |
649 | sync.BottomSurface = 0 | |
650 | sync.Material = "SmoothPlastic" | |
651 | syncm = Instance.new("SpecialMesh", sync) | |
652 | syncm.MeshType = Enum.MeshType.Sphere | |
653 | syncm.Scale = Vector3.new(.13,0.1,0.05) | |
654 | syncsize = syncm.Scale | |
655 | sync.Transparency = 1 | |
656 | weld = Instance.new("Weld", head) | |
657 | weld.Part0 = sync | |
658 | weld.Part1 = head | |
659 | weld.C1 = CFrame.new(0,-.25,-.6) | |
660 | game:service'RunService'.RenderStepped:connect(function() | |
661 | syncm.Scale = syncm.Scale:lerp(Vector3.new(syncsize.X+sound.PlaybackLoudness/9200,sound.PlaybackLoudness/3500,syncsize.Z),0.9) | |
662 | neck.C0 = neck.C0:lerp(CFrame.new(0,1,-.10)*CFrame.Angles(math.rad(syncm.Scale.Y*-910) +math.rad(-30),0,math.rad(180)),0.15) | |
663 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0+syncm.Scale.Y*1000), math.rad(0+syncm.Scale.Y*360), math.rad(0+syncm.Scale.Y*1000)),.1) | |
664 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0+syncm.Scale.Y*1000), math.rad(0-syncm.Scale.Y*360), math.rad(0-syncm.Scale.Y*1000)),.1) | |
665 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,-0-syncm.Scale.Y*4.6)* angles(math.rad(0+syncm.Scale.Y*260.6),math.rad(0),math.rad(0)),.25) | |
666 | LH.C0=clerp(LH.C0,cf(-1,-0-syncm.Scale.Y*11.6,-0.5+syncm.Scale.Y*5.4)*angles(math.rad(0-syncm.Scale.Y*160.6),math.rad(-90),math.rad(0)),.3) | |
667 | RH.C0=clerp(RH.C0,cf(1,-1+syncm.Scale.Y*3.8,-0-syncm.Scale.Y*5.4)*angles(math.rad(0+syncm.Scale.Y*290.6),math.rad(90),math.rad(0)),.5) | |
668 | light.Color = Color3.new(0,0,0) | |
669 | light.Brightness = 2 + syncm.Scale.Y*550.6 | |
670 | light.Range = syncm.Scale.Y*550.6 | |
671 | if sound.PlaybackLoudness >= 320 and shake == true or shake == false then | |
672 | light.Color = Color3.new(0,255,255) | |
673 | end | |
674 | if sound.PlaybackLoudness >= 320 and shake == true then | |
675 | for i = 0,0.9,0.17 do | |
676 | swait() | |
677 | Humanoid.CameraOffset = Vector3.new(math.random(-4,4*i),math.random(-.9,.9*i),math.random(-4.7,4.7*i)) | |
678 | end | |
679 | end | |
680 | if sound.PlaybackLoudness >= 450 and shake == true or shake == false then | |
681 | text.Text = "This is perfection at its finest." | |
682 | end | |
683 | if sound.PlaybackLoudness >= 390 and shake == true then | |
684 | for i = 0,0.9,0.17 do | |
685 | swait() | |
686 | Humanoid.CameraOffset = Vector3.new(math.random(-7,7*i),math.random(-3.9,3.9*i),math.random(-7.7,7.7*i)) | |
687 | end | |
688 | end | |
689 | if sound.PlaybackLoudness >= 390 and shake == true or shake == false then | |
690 | text.Text = "You know its good when this starts to happen" | |
691 | end | |
692 | if sound.PlaybackLoudness <= 270 then | |
693 | Humanoid.CameraOffset = Vector3.new(0,0,0) | |
694 | light.Color = Color3.new(255,0,255) | |
695 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.2) | |
696 | text.Text = "We Like To Party!" | |
697 | end | |
698 | if sound.PlaybackLoudness <= 240 then | |
699 | Humanoid.CameraOffset = Vector3.new(0,0,0) | |
700 | light.Color = Color3.new(255,0,0) | |
701 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.2) | |
702 | text.Text = "" | |
703 | end | |
704 | ||
705 | if sound.PlaybackLoudness <= 1 then | |
706 | Humanoid.CameraOffset = Vector3.new(0,0,0) | |
707 | text.Text = "Searching for music.." | |
708 | end | |
709 | end) | |
710 | ||
711 | while true do | |
712 | Character.Zombie.MaxHealth = math.huge | |
713 | Character.Zombie.Health = math.huge -- more god mode | |
714 | wait() -- DO NOT REMOVE unless you wanna crash yourself | |
715 | end |