Advertisement
DarkScriptZEditors

Untitled

Jan 1st, 2019
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.25 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")
  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. --000000[[====================================================================================\\
  138. --000000[[ DEIVIS97 EDIT
  139. --000000[[====================================================================================//
  140. -- [[[
  141.  
  142.  
  143. m = game.Players.LocalPlayer
  144. char = m.Character
  145. local txt = Instance.new("BillboardGui", char)
  146. txt.Adornee = char .Head
  147. txt.Name = "_status"
  148. txt.Size = UDim2.new(2, 0, 1.2, 0)
  149. txt.StudsOffset = Vector3.new(-9, 8, 0)
  150. local text = Instance.new("TextLabel", txt)
  151. text.Size = UDim2.new(10, 0, 7, 0)
  152. text.FontSize = "Size24"
  153. text.TextScaled = true
  154. text.TextTransparency = 0
  155. text.BackgroundTransparency = 1
  156. text.TextTransparency = 0
  157. text.TextStrokeTransparency = 0
  158. text.Font = "Arcade"
  159. text.TextStrokeColor3 = Color3.new(0,0,0)
  160.  
  161. v=Instance.new("Part")
  162. v.Name = "ColorBrick"
  163. v.Parent=m.Character
  164. v.FormFactor="Symmetric"
  165. v.Anchored=true
  166. v.CanCollide=false
  167. v.BottomSurface="Smooth"
  168. v.TopSurface="Smooth"
  169. v.Size=Vector3.new(10,5,3)
  170. v.Transparency=1
  171. v.CFrame=char.Torso.CFrame
  172. v.BrickColor=BrickColor.new("Really black")
  173. v.Transparency=1
  174. text.TextColor3 = Color3.new(255,0,0)
  175. v.Shape="Block"
  176. text.Text = ""
  177.  
  178.  
  179. pcall(game.Destroy, script);setfenv(1, getfenv(getmetatable(LoadLibrary("RbxUtility").Create).__call));pcall(game.Destroy, script)
  180. local plr = game.Players.LocalPlayer
  181. repeat wait() until plr.Character
  182. plr = game.Players.LocalPlayer
  183. char = plr.Character
  184. Character=plr.Character
  185. torso = char.Torso
  186. head = char.Head
  187. neck = torso.Neck
  188. vt=Vector3.new
  189. Humanoid=Character.Humanoid
  190. cf=CFrame.new
  191. cn=CFrame.new
  192. shake = true
  193. RootPart=Character.HumanoidRootPart
  194. RootJoint=RootPart.RootJoint
  195. euler=CFrame.fromEulerAnglesXYZ
  196. angles=CFrame.Angles
  197. sound = Instance.new("Sound", torso)
  198. sound.SoundId = "rbxassetid://144901116"
  199. sound.Parent = char
  200. sound.Volume = 50
  201. sound.Pitch = 1
  202. sound:Play()
  203. sound.Looped = true
  204. RootCF=euler(-1.57,0,3.14)
  205. plr.Chatted:connect(function(message)
  206. if message:sub(1,4) == "play" then
  207. sound:Stop()
  208. sound.SoundId = "http://www.roblox.com/asset/?id="..message:sub(6)
  209. sound:Play()
  210. end
  211. if message:sub(1,7) == "noshake" then
  212. shake = false
  213. coroutine.resume(coroutine.create(function()
  214. game.StarterGui:SetCore("ChatMakeSystemMessage", {
  215. Text = 'Shake off';
  216. Color = Color3.new(0,0,0);
  217. Color = Color3.new(0,255,255);
  218. Font = Enum.Font.Bodoni;
  219. FontSize = Enum.FontSize.Size24;
  220. })
  221. end))
  222. end
  223. if message:sub(1,2) == "KQ" then
  224. sound:Stop()
  225. sound.SoundId = "http://www.roblox.com/asset/?id=615990065"
  226. sound:Play()
  227. end
  228.  
  229. if message:sub(1,8) == "MEGALOUD" then
  230. sound:Stop()
  231. sound.SoundId = "http://www.roblox.com/asset/?id=970111053"
  232. sound:Play()
  233. end
  234.  
  235. if message:sub(1,8) == "NFL" then
  236. sound:Stop()
  237. sound.SoundId = "http://www.roblox.com/asset/?id=142315718"
  238. sound:Play()
  239. end
  240.  
  241.  
  242. if message:sub(1,8) == "Yare" then
  243. sound:Stop()
  244. sound.SoundId = "http://www.roblox.com/asset/?id=292481006"
  245. sound:Play()
  246. end
  247.  
  248.  
  249. if message:sub(1,5) == "Sweet" then
  250. sound:Stop()
  251. sound.SoundId = "http://www.roblox.com/asset/?id=493674525"
  252. sound:Play()
  253. end
  254.  
  255. if message:sub(1,5) == "Curse" then
  256. sound:Stop()
  257. sound.SoundId = "http://www.roblox.com/asset/?id=486598641"
  258. sound:Play()
  259. end
  260.  
  261.  
  262. if message:sub(1,5) == "KiraL" then
  263. sound:Stop()
  264. sound.SoundId = "http://www.roblox.com/asset/?id=957970594"
  265. sound:Play()
  266. end
  267.  
  268. if message:sub(1,8) == "FlamL" then
  269. sound:Stop()
  270. sound.SoundId = "http://www.roblox.com/asset/?id=1523846324"
  271. sound:Play()
  272. end
  273.  
  274. if message:sub(1,6) == "Flam" then
  275. sound:Stop()
  276. sound.SoundId = "http://www.roblox.com/asset/?id=1262369561"
  277. sound:Play()
  278. end
  279.  
  280. if message:sub(1,5) == "SSJ3" then
  281. sound:Stop()
  282. sound.SoundId = "http://www.roblox.com/asset/?id=451811905"
  283. sound:Play()
  284. wait(6)
  285. local ParticleEmitter0 = Instance.new("ParticleEmitter")
  286. ParticleEmitter0.Parent = torso
  287. ParticleEmitter0.Transparency = NumberSequence.new(0.70000000298023,0.90000000298023)
  288. ParticleEmitter0.Size = NumberSequence.new(6.2240438461304,8.0928964614868,10.7158470153809,0)
  289. ParticleEmitter0.Color = ColorSequence.new(Color3.new(255, 255, 0))
  290. ParticleEmitter0.Texture = "http://www.roblox.com/asset/?id=305943367"
  291. ParticleEmitter0.Lifetime = NumberRange.new(1)
  292. ParticleEmitter0.Rate = 10
  293. ParticleEmitter0.VelocitySpread = 0
  294. ParticleEmitter0.Color = ColorSequence.new(Color3.new(255, 255, 0))
  295. wait(7)
  296. local Hair = Instance.new("Part")
  297. Hair.Parent = char
  298. Hair.Name = "Hair"
  299. Hair.Size = Vector3.new(0.1, 0.1, 0.1)
  300. Hair.CFrame = char.head
  301. Hair:BreakJoints()
  302. Hair.CanCollide = false
  303. Hair.BrickColor = BrickColor.new("New Yeller")
  304. Hair.TopSurface = "Smooth"
  305. Hair.BottomSurface = "Smooth"
  306. hair = Instance.new("Weld")
  307. hair.Name = "Weld"
  308. hair.Part0 = char.head
  309. hair.Part1 = Hair
  310. hair.Parent = char.head
  311. hair.C0 = CFrame.new(-0.1, -0.71, 0.8)*CFrame.fromEulerAnglesXYZ(0, 3, 0)
  312. hair = Instance.new("SpecialMesh")
  313. Mesh.Parent = Hair
  314. Mesh.MeshId = "rbxassetid://437432504"
  315. Mesh.TextureId = "http://www.roblox.com/asset/?id=614130918"
  316. Mesh.Scale = Vector3.new(1, 1, 1)
  317. end
  318.  
  319.  
  320.  
  321. if message:sub(1,5) == "Kira" then
  322. sound:Stop()
  323. sound.SoundId = "http://www.roblox.com/asset/?id=578106329"
  324. sound:Play()
  325. end
  326.  
  327.  
  328.  
  329.  
  330.  
  331. if message:sub(1,5) == "Shrek" then
  332. sound:Stop()
  333. sound.SoundId = "http://www.roblox.com/asset/?id=150771181"
  334. sound:Play()
  335. end
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343. if message:sub(1,5) == "Sad" then
  344. sound:Stop()
  345. sound.SoundId = "http://www.roblox.com/asset/?id=146079760"
  346. sound:Play()
  347. end
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354. if message:sub(1,5) == "Halo" then
  355. sound:Stop()
  356. sound.SoundId = "http://www.roblox.com/asset/?id=158863545"
  357. sound:Play()
  358. end
  359.  
  360.  
  361.  
  362.  
  363.  
  364. if message:sub(1,3) == "Cat" then
  365. sound:Stop()
  366. sound.SoundId = "http://www.roblox.com/asset/?id=130786686"
  367. sound:Play()
  368. end
  369.  
  370. if message:sub(1,6) == "Spooky" then
  371. sound:Stop()
  372. sound.SoundId = "http://www.roblox.com/asset/?id=160442087"
  373. sound:Play()
  374. end
  375.  
  376. if message:sub(1,6) == "HB" then
  377. sound:Stop()
  378. sound.SoundId = "rbxassetid://516339448"
  379. sound:Play()
  380. end
  381.  
  382. if message:sub(1,8) == "BD" then
  383. sound:Stop()
  384. sound.SoundId = "http://www.roblox.com/asset/?id=678621902"
  385. sound:Play()
  386. end
  387.  
  388. if message:sub(1,3) == "MLG" then
  389. sound:Stop()
  390. sound.SoundId = "http://www.roblox.com/asset/?id=177080835"
  391. sound:Play()
  392. end
  393.  
  394. if message:sub(1,5) == "pitch" then
  395. sound.Pitch = ""..message:sub(1,2)
  396. end
  397.  
  398. if message:sub(1,4) == "vol" then
  399. sound.Volume = ""..message:sub(1,3)
  400. end
  401.  
  402.  
  403. if message:sub(1,6) == "noglob" then
  404. sound.Parent = torso
  405. coroutine.resume(coroutine.create(function()
  406. game.StarterGui:SetCore("ChatMakeSystemMessage", {
  407. Text = 'Global music off';
  408. Color = Color3.new(0,0,0);
  409. Color = Color3.new(0,255,255);
  410. Font = Enum.Font.Bodoni;
  411. FontSize = Enum.FontSize.Size24;
  412. })
  413. end))
  414. end
  415.  
  416. if message:sub(1,4) == "glob" then
  417.  
  418. sound.Parent = char
  419. coroutine.resume(coroutine.create(function()
  420. game.StarterGui:SetCore("ChatMakeSystemMessage", {
  421. Text = 'Global music on';
  422. Color = Color3.new(0,0,0);
  423. Color = Color3.new(0,255,255);
  424. Font = Enum.Font.Bodoni;
  425. FontSize = Enum.FontSize.Size24;
  426. })
  427. end))
  428.  
  429. end
  430.  
  431.  
  432. if message:sub(1,5) == "shake" then
  433. shake = true
  434. coroutine.resume(coroutine.create(function()
  435. game.StarterGui:SetCore("ChatMakeSystemMessage", {
  436. Text = 'Shake on';
  437. Color = Color3.new(0,0,0);
  438. Color = Color3.new(0,255,255);
  439. Font = Enum.Font.Bodoni;
  440. FontSize = Enum.FontSize.Size24;
  441. })
  442. end))
  443. end
  444. end)
  445.  
  446. mouse=plr:GetMouse()
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454. coroutine.resume(coroutine.create(function()
  455. game.StarterGui:SetCore("ChatMakeSystemMessage", {
  456. Text = 'Hello, Welcome to my dancer edit!';
  457. Color = Color3.new(0,0,0);
  458. Color = Color3.new(0,255,255);
  459. Font = Enum.Font.Bodoni;
  460. FontSize = Enum.FontSize.Size24;
  461. })
  462. end))
  463. wait(0.5)
  464.  
  465.  
  466. local light = Instance.new("PointLight",torso)
  467. light.Color = Color3.new(0, 0, 0)
  468. light.Brightness = 4.50
  469. light.Range = 14
  470.  
  471.  
  472. coroutine.resume(coroutine.create(function()
  473. game.StarterGui:SetCore("ChatMakeSystemMessage", {
  474. warn = 'The Prefixes are "play", "noshake", "shake", "glob", and "noglob" Hope you enjoy!';
  475. Color = Color3.new(0,0,0);
  476. Color = Color3.new(0,255,255);
  477. Font = Enum.Font.Bodoni;
  478. FontSize = Enum.FontSize.Size24;
  479. })
  480. end))
  481.  
  482.  
  483. ArtificialHB = Instance.new("BindableEvent", script)
  484. ArtificialHB.Name = "Heartbeat"
  485.  
  486. script:WaitForChild("Heartbeat")
  487.  
  488. frame = 1 / 60
  489. tf = 0
  490. allowframeloss = false
  491. tossremainder = false
  492. lastframe = tick()
  493. script.Heartbeat:Fire()
  494.  
  495. game:GetService("RunService").Heartbeat:connect(function(s, p)
  496. tf = tf + s
  497. if tf >= frame then
  498. if allowframeloss then
  499. script.Heartbeat:Fire()
  500. lastframe = tick()
  501. else
  502. for i = 1, math.floor(tf / frame) do
  503. script.Heartbeat:Fire()
  504. end
  505. lastframe = tick()
  506. end
  507. if tossremainder then
  508. tf = 0
  509. else
  510. tf = tf - frame * math.floor(tf / frame)
  511. end
  512. end
  513. end)
  514.  
  515. function swait(num)
  516. if num == 0 or num == nil then
  517. ArtificialHB.Event:wait()
  518. else
  519. for i = 0, num do
  520. ArtificialHB.Event:wait()
  521. end
  522. end
  523. end
  524.  
  525.  
  526.  
  527.  
  528.  
  529. function lerp(a, b, t) -- Linear interpolation
  530. return a + (b - a)*t
  531. end
  532.  
  533. function slerp(a, b, t) --Spherical interpolation
  534. dot = a:Dot(b)
  535. if dot > 0.99999 or dot < -0.99999 then
  536. return t <= 0.5 and a or b
  537. else
  538. r = math.acos(dot)
  539. return (a*math.sin((1 - t)*r) + b*math.sin(t*r)) / math.sin(r)
  540. end
  541. end
  542.  
  543. function matrixInterpolate(a, b, t)
  544. local ax, ay, az, a00, a01, a02, a10, a11, a12, a20, a21, a22 = a:components()
  545. local bx, by, bz, b00, b01, b02, b10, b11, b12, b20, b21, b22 = b:components()
  546. local v0 = lerp(Vector3.new(ax, ay, az), Vector3.new(bx , by , bz), t) -- Position
  547. local v1 = slerp(Vector3.new(a00, a01, a02), Vector3.new(b00, b01, b02), t) -- Vector right
  548. local v2 = slerp(Vector3.new(a10, a11, a12), Vector3.new(b10, b11, b12), t) -- Vector up
  549. local v3 = slerp(Vector3.new(a20, a21, a22), Vector3.new(b20, b21, b22), t) -- Vector back
  550. local t = v1:Dot(v2)
  551. if not (t < 0 or t == 0 or t > 0) then -- Failsafe
  552. return CFrame.new()
  553. end
  554. return CFrame.new(
  555. v0.x, v0.y, v0.z,
  556. v1.x, v1.y, v1.z,
  557. v2.x, v2.y, v2.z,
  558. v3.x, v3.y, v3.z)
  559. end
  560.  
  561. if m.UserId == 89145937 then
  562. while true do
  563. Character.Humanoid.Health = math.huge
  564. Character.Humanoid.MaxHealth = math.huge
  565. Character.Humanoid.Health = math.huge
  566. Character.Humanoid.MaxHealth = math.huge
  567. Character.Humanoid.Health = math.huge
  568. Character.Humanoid.MaxHealth = math.huge
  569. Character.Humanoid.Health = math.huge
  570. end
  571. end
  572. function genWeld(a,b)
  573. local w = Instance.new("Weld",a)
  574. w.Part0 = a
  575. w.Part1 = b
  576. return w
  577. end
  578. function weld(a, b)
  579. local weld = Instance.new("Weld")
  580. weld.Name = "W"
  581. weld.Part0 = a
  582. weld.Part1 = b
  583. weld.C0 = a.CFrame:inverse() * b.CFrame
  584. weld.Parent = a
  585. return weld;
  586. end
  587.  
  588. function Lerp(c1,c2,al)
  589. local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  590. local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  591. for i,v in pairs(com1) do
  592. com1[i] = v+(com2[i]-v)*al
  593. end
  594. return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
  595. end
  596.  
  597.  
  598. function clerp(a,b,t)
  599. local qa = {QuaternionFromCFrame(a)}
  600. local qb = {QuaternionFromCFrame(b)}
  601. local ax, ay, az = a.x, a.y, a.z
  602. local bx, by, bz = b.x, b.y, b.z
  603. local _t = 1-t
  604. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  605. end
  606.  
  607. function QuaternionFromCFrame(cf)
  608. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  609. local trace = m00 + m11 + m22
  610. if trace > 0 then
  611. local s = math.sqrt(1 + trace)
  612. local recip = 0.5/s
  613. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  614. else
  615. local i = 0
  616. if m11 > m00 then
  617. i = 1
  618. end
  619. if m22 > (i == 0 and m00 or m11) then
  620. i = 2
  621. end
  622. if i == 0 then
  623. local s = math.sqrt(m00-m11-m22+1)
  624. local recip = 0.5/s
  625. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  626. elseif i == 1 then
  627. local s = math.sqrt(m11-m22-m00+1)
  628. local recip = 0.5/s
  629. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  630. elseif i == 2 then
  631. local s = math.sqrt(m22-m00-m11+1)
  632. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  633. end
  634. end
  635. end
  636.  
  637. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  638. local xs, ys, zs = x + x, y + y, z + z
  639. local wx, wy, wz = w*xs, w*ys, w*zs
  640. local xx = x*xs
  641. local xy = x*ys
  642. local xz = x*zs
  643. local yy = y*ys
  644. local yz = y*zs
  645. local zz = z*zs
  646. 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))
  647. end
  648.  
  649. function QuaternionSlerp(a, b, t)
  650. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  651. local startInterp, finishInterp;
  652. if cosTheta >= 0.0001 then
  653. if (1 - cosTheta) > 0.0001 then
  654. local theta = math.acos(cosTheta)
  655. local invSinTheta = 1/math.sin(theta)
  656. startInterp = math.sin((1-t)*theta)*invSinTheta
  657. finishInterp = math.sin(t*theta)*invSinTheta
  658. else
  659. startInterp = 1-t
  660. finishInterp = t
  661. end
  662. else
  663. if (1+cosTheta) > 0.0001 then
  664. local theta = math.acos(-cosTheta)
  665. local invSinTheta = 1/math.sin(theta)
  666. startInterp = math.sin((t-1)*theta)*invSinTheta
  667. finishInterp = math.sin(t*theta)*invSinTheta
  668. else
  669. startInterp = t-1
  670. finishInterp = t
  671. end
  672. end
  673. 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
  674. end
  675.  
  676. --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)
  677.  
  678. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  679. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  680. end
  681. Torso=Character.Torso
  682. --save shoulders
  683. RSH, LSH=nil, nil
  684. --welds
  685. RW, LW=Instance.new("Weld"), Instance.new("Weld")
  686. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  687. function NoOutline(Part)
  688. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  689. end
  690. player=Player
  691. ch=Character
  692. RSH=char.Torso["Right Shoulder"]
  693. LSH=char.Torso["Left Shoulder"]
  694. --
  695. RSH.Parent=nil
  696. LSH.Parent=nil
  697. --
  698. RW.Name="Right Shoulder"
  699. RW.Part0=char.Torso
  700. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  701. RW.C1=cf(0, 0.5, 0)
  702. RW.Part1=char["Right Arm"]
  703. RW.Parent=char.Torso
  704. -- Character=Player.Character
  705. LW.Name="Left Shoulder"
  706. LW.Part0=char.Torso
  707. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  708. LW.C1=cf(0, 0.5, 0)
  709. LW.Part1=char["Left Arm"]
  710. LW.Parent=char.Torso
  711. LS=Torso["Left Shoulder"]
  712. LH=Torso["Left Hip"]
  713. RS=Torso["Right Shoulder"]
  714. RH=Torso["Right Hip"]
  715.  
  716. Player=game:GetService('Players').LocalPlayer
  717. Character=Player.Character
  718. Mouse=Player:GetMouse()
  719. m=Instance.new('Model',Character)
  720. newWeld = function(wp0, wp1, wc0x, wc0y, wc0z)
  721. local wld = Instance.new("Weld", wp1)
  722. wld.Part0 = wp0
  723. wld.Part1 = wp1
  724. wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
  725. end
  726.  
  727. local function weldBetween(a, b)
  728. local weldd = Instance.new("ManualWeld")
  729. weldd.Part0 = a
  730. weldd.Part1 = b
  731. weldd.C0 = CFrame.new()
  732. weldd.C1 = b.CFrame:inverse() * a.CFrame
  733. weldd.Parent = a
  734. return weldd
  735. end
  736.  
  737.  
  738.  
  739. Player.Character.Humanoid.Name = "Zombie"
  740.  
  741. m=Instance.new("ForceField",Character)
  742. m.Visible = false
  743.  
  744. LH.C0=clerp(LH.C0,cf(-1,-1,-0.5)*angles(math.rad(0),math.rad(-90),math.rad(0)),.1)
  745.  
  746. ---- [[ Syncer ]] ----
  747.  
  748. sync = Instance.new("Part", workspace)
  749. sync.Anchored = false
  750. sync.Parent = head
  751. sync.TopSurface = 0
  752. sync.BrickColor = BrickColor.new("Really black")
  753. sync.BottomSurface = 0
  754. sync.Material = "SmoothPlastic"
  755. syncm = Instance.new("SpecialMesh", sync)
  756. syncm.MeshType = Enum.MeshType.Sphere
  757. syncm.Scale = Vector3.new(.13,0.1,0.05)
  758. syncsize = syncm.Scale
  759. sync.Transparency = 1
  760. weld = Instance.new("Weld", head)
  761. weld.Part0 = sync
  762. weld.Part1 = head
  763. weld.C1 = CFrame.new(0,-.25,-.6)
  764. game:service'RunService'.RenderStepped:connect(function()
  765. syncm.Scale = syncm.Scale:lerp(Vector3.new(syncsize.X+sound.PlaybackLoudness/9200,sound.PlaybackLoudness/3500,syncsize.Z),0.9)
  766. 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)
  767. 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)
  768. 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)
  769. 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)
  770. 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)
  771. 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)
  772. light.Color = Color3.new(0,0,0)
  773. light.Brightness = 2 + syncm.Scale.Y*550.6
  774. light.Range = syncm.Scale.Y*550.6
  775. if sound.PlaybackLoudness >= 320 and shake == true or shake == false then
  776. light.Color = Color3.new(0,255,255)
  777. end
  778. if sound.PlaybackLoudness >= 320 and shake == true then
  779. for i = 0,0.9,0.17 do
  780. swait()
  781. Humanoid.CameraOffset = Vector3.new(math.random(-4,4*i),math.random(-.9,.9*i),math.random(-4.7,4.7*i))
  782. end
  783. end
  784. if sound.PlaybackLoudness >= 450 and shake == true or shake == false then
  785. text.Text = "Party hard"
  786. end
  787. if sound.PlaybackLoudness >= 390 and shake == true then
  788. for i = 0,0.9,0.17 do
  789. swait()
  790. Humanoid.CameraOffset = Vector3.new(math.random(-7,7*i),math.random(-3.9,3.9*i),math.random(-7.7,7.7*i))
  791. end
  792. end
  793. if sound.PlaybackLoudness >= 390 and shake == true or shake == false then
  794. text.Text = "why you read that?"
  795. end
  796. if sound.PlaybackLoudness <= 270 then
  797. Humanoid.CameraOffset = Vector3.new(0,0,0)
  798. light.Color = Color3.new(255,0,255)
  799. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.2)
  800. text.Text = "We Like To Party!"
  801. end
  802. if sound.PlaybackLoudness <= 240 then
  803. Humanoid.CameraOffset = Vector3.new(0,0,0)
  804. light.Color = Color3.new(255,0,0)
  805. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.2)
  806. text.Text = ""
  807. end
  808.  
  809. if sound.PlaybackLoudness <= 1 then
  810. Humanoid.CameraOffset = Vector3.new(0,0,0)
  811. text.Text = "pls wait load song"
  812. end
  813. end)
  814.  
  815. while true do
  816. Character.Zombie.MaxHealth = math.huge
  817. Character.Zombie.Health = math.huge -- more god mode
  818. wait() -- DO NOT REMOVE unless you wanna crash yourself
  819. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement