Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 30.54 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("lol") end
  2. local Player,game,owner = owner,game
  3. local RealPlayer = Player
  4. do
  5. local RealPlayer = RealPlayer
  6. script.Parent = RealPlayer.Character
  7.  
  8. --Fake event to make stuff like Mouse.KeyDown work
  9. local Disconnect_Function = function(this)
  10. this[1].Functions[this[2]] = nil
  11. end
  12. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  13. local FakeEvent_Metatable = {__index={
  14. Connect = function(this,f)
  15. local i = tostring(math.random(0,10000))
  16. while this.Functions[i] do
  17. i = tostring(math.random(0,10000))
  18. end
  19. this.Functions[i] = f
  20. return setmetatable({this,i},Disconnect_Metatable)
  21. end
  22. }}
  23. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  24. local function fakeEvent()
  25. return setmetatable({Functions={}},FakeEvent_Metatable)
  26. end
  27.  
  28. --Creating fake input objects with fake variables
  29. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  30. FakeMouse.keyUp = FakeMouse.KeyUp
  31. FakeMouse.keyDown = FakeMouse.KeyDown
  32. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  33. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  34. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  35. end}
  36. --Merged 2 functions into one by checking amount of arguments
  37. CAS.UnbindAction = CAS.BindAction
  38.  
  39. --This function will trigger the events that have been :Connect()'ed
  40. local function TriggerEvent(self,ev,...)
  41. for _,f in pairs(self[ev].Functions) do
  42. f(...)
  43. end
  44. end
  45. FakeMouse.TriggerEvent = TriggerEvent
  46. UIS.TriggerEvent = TriggerEvent
  47.  
  48. --Client communication
  49. local Event = Instance.new("RemoteEvent")
  50. Event.Name = "UserInput_Event"
  51. Event.OnServerEvent:Connect(function(plr,io)
  52. if plr~=RealPlayer then return end
  53. FakeMouse.Target = io.Target
  54. FakeMouse.Hit = io.Hit
  55. if not io.isMouse then
  56. local b = io.UserInputState == Enum.UserInputState.Begin
  57. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  58. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  59. end
  60. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  61. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  62. end
  63. for _,t in pairs(CAS.Actions) do
  64. for _,k in pairs(t.Keys) do
  65. if k==io.KeyCode then
  66. t.Function(t.Name,io.UserInputState,io)
  67. end
  68. end
  69. end
  70. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  71. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  72. end
  73. end)
  74. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  75. local Mouse = owner:GetMouse()
  76. local UIS = game:GetService("UserInputService")
  77. local input = function(io,RobloxHandled)
  78. if RobloxHandled then return end
  79. --Since InputObject is a client-side instance, we create and pass table instead
  80. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  81. end
  82. UIS.InputBegan:Connect(input)
  83. UIS.InputEnded:Connect(input)
  84.  
  85. local h,t
  86. --Give the server mouse data every second frame, but only if the values changed
  87. --If player is not moving their mouse, client won't fire events
  88. local HB = game:GetService("RunService").Heartbeat
  89. while true do
  90. if h~=Mouse.Hit or t~=Mouse.Target then
  91. h,t=Mouse.Hit,Mouse.Target
  92. Event:FireServer({isMouse=true,Target=t,Hit=h})
  93. end
  94. --Wait 2 frames
  95. for i=1,2 do
  96. HB:Wait()
  97. end
  98. end]==],script)
  99.  
  100. ----Sandboxed game object that allows the usage of client-side methods and services
  101. --Real game object
  102. local RealGame = game
  103.  
  104. --Metatable for fake service
  105. local FakeService_Metatable = {
  106. __index = function(self,k)
  107. local s = rawget(self,"_RealService")
  108. if s then
  109. return typeof(s[k])=="function"
  110. and function(_,...)return s[k](s,...)end or s[k]
  111. end
  112. end,
  113. __newindex = function(self,k,v)
  114. local s = rawget(self,"_RealService")
  115. if s then s[k]=v end
  116. end
  117. }
  118. local function FakeService(t,RealService)
  119. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  120. return setmetatable(t,FakeService_Metatable)
  121. end
  122.  
  123. --Fake game object
  124. local FakeGame = {
  125. GetService = function(self,s)
  126. return rawget(self,s) or RealGame:GetService(s)
  127. end,
  128. Players = FakeService({
  129. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  130. },"Players"),
  131. UserInputService = FakeService(UIS,"UserInputService"),
  132. ContextActionService = FakeService(CAS,"ContextActionService"),
  133. RunService = FakeService({
  134. _btrs = {},
  135. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  136. BindToRenderStep = function(self,name,_,fun)
  137. self._btrs[name] = self.Heartbeat:Connect(fun)
  138. end,
  139. UnbindFromRenderStep = function(self,name)
  140. self._btrs[name]:Disconnect()
  141. end,
  142. },"RunService")
  143. }
  144. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  145. FakeGame.service = FakeGame.GetService
  146. FakeService(FakeGame,game)
  147. --Changing owner to fake player object to support owner:GetMouse()
  148. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  149. end
  150. print([[
  151. ___________________________________
  152.  
  153. Booty Offender // A Kyutatsuki13's script
  154. Build 0001
  155. Credit to Ethanhong that gave me this idea ;)
  156. https://discord.gg/DueqyJ8
  157.  
  158. ___________________________________
  159. ]])
  160.  
  161. warn("You're whitelisted, "..game:GetService("Players").LocalPlayer.Name.." :)")
  162.  
  163. local p = game:GetService("Players").LocalPlayer
  164. local char = p.Character
  165. local mouse = p:GetMouse()
  166. local larm = char:WaitForChild("Left Arm")
  167. local rarm = char:WaitForChild("Right Arm")
  168. local lleg = char:WaitForChild("Left Leg")
  169. local rleg = char:WaitForChild("Right Leg")
  170. local hed = char:WaitForChild("Head")
  171. local torso = char:WaitForChild("Torso")
  172. local root = char:WaitForChild("HumanoidRootPart")
  173. local hum = char:FindFirstChildOfClass("Humanoid")
  174. local debris = game:GetService("Debris")
  175. local input = game:GetService("UserInputService")
  176. local run = game:GetService("RunService")
  177. local rs = run.RenderStepped
  178. local wingpose = "Idle"
  179. local DebrisModel = Instance.new("Model",char)
  180. DebrisModel.Name = "Debris"
  181. repeat rs:wait() until p.CharacterAppearanceLoaded
  182.  
  183. noidle = false
  184. shift = false
  185. control = false
  186.  
  187. ----------------------------------------------------------------------------
  188.  
  189. function rswait(value)
  190. if value ~= nil and value ~= 0 then
  191. for i=1,value do
  192. rs:wait()
  193. end
  194. else
  195. rs:wait()
  196. end
  197. end
  198.  
  199. ----------------------------------------------------------------------------
  200.  
  201. local timeposition = 0
  202.  
  203. function music(id)
  204. if id == "Stop" then
  205. if not torso:FindFirstChild("MusicRuin") then
  206. soundz = Instance.new("Sound",torso)
  207. end
  208. soundz:Stop()
  209. else
  210. if not torso:FindFirstChild("MusicRuin") then
  211. soundz = Instance.new("Sound",torso)
  212. for i=1,2 do
  213. local equalizer = Instance.new("EqualizerSoundEffect",soundz)
  214. equalizer.HighGain = 6
  215. equalizer.MidGain = 0
  216. equalizer.LowGain = 6
  217. end
  218. end
  219. soundz.Volume = 10
  220. soundz.Name = "MusicRuin"
  221. soundz.Looped = true
  222. soundz.PlaybackSpeed = 1
  223. soundz.SoundId = "rbxassetid://"..id
  224. soundz:Stop()
  225. soundz:Play()
  226. end
  227. end
  228.  
  229. ----------------------------------------------------------------------------
  230.  
  231. function lerp(a, b, t)
  232. return a + (b - a)*t
  233. end
  234.  
  235. ----------------------------------------------------------------------------
  236.  
  237. function Lerp(c1,c2,al)
  238. local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  239. local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  240. for i,v in pairs(com1) do
  241. com1[i] = v+(com2[i]-v)*al
  242. end
  243. return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
  244. end
  245.  
  246. ----------------------------------------------------------------------------
  247.  
  248. function slerp(a, b, t)
  249. dot = a:Dot(b)
  250. if dot > 0.99999 or dot < -0.99999 then
  251. return t <= 0.5 and a or b
  252. else
  253. r = math.acos(dot)
  254. return (a*math.sin((1 - t)*r) + b*math.sin(t*r)) / math.sin(r)
  255. end
  256. end
  257.  
  258. ----------------------------------------------------------------------------
  259.  
  260. function clerp(c1,c2,al)
  261.  
  262. local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  263.  
  264. local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  265.  
  266. for i,v in pairs(com1) do
  267.  
  268. com1[i] = lerp(v,com2[i],al)
  269.  
  270. end
  271.  
  272. return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
  273.  
  274. end
  275.  
  276. ----------------------------------------------------------------------------
  277.  
  278. function findAllNearestTorso(pos,dist)
  279. local list = workspace:children()
  280. local torso = {}
  281. local temp = nil
  282. local human = nil
  283. local temp2 = nil
  284. for x = 1, #list do
  285. temp2 = list[x]
  286. if (temp2.className == "Model") and (temp2 ~= char) then
  287. temp = temp2:findFirstChild("Torso")
  288. human = temp2:findFirstChildOfClass("Humanoid")
  289. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  290. if (temp.Position - pos).magnitude < dist then
  291. table.insert(torso,temp)
  292. dist = (temp.Position - pos).magnitude
  293. end
  294. end
  295. end
  296. end
  297. return torso
  298. end
  299.  
  300. ----------------------------------------------------------------------------
  301.  
  302. function checkIfNotPlayer(model)
  303. if model.CanCollide == true and model ~= char and model.Parent ~= char and model.Parent.Parent ~= char and model.Parent.Parent ~= char and model.Parent ~= DebrisModel and model.Parent.Parent ~= DebrisModel and model.Parent.Parent.Parent ~= DebrisModel and model ~= wings and model.Parent ~= wings and model.Parent.Parent ~= wings then
  304. return true
  305. else
  306. return false
  307. end
  308. end
  309.  
  310. ----------------------------------------------------------------------------
  311.  
  312. function newWeld(wp0, wp1, wc0x, wc0y, wc0z)
  313.  
  314. local wld = Instance.new("Weld", wp1)
  315.  
  316. wld.Part0 = wp0
  317.  
  318. wld.Part1 = wp1
  319.  
  320. wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
  321.  
  322. return wld
  323.  
  324. end
  325.  
  326. function weld(model)
  327. local parts,last = {}
  328. local function scan(parent)
  329. for _,v in pairs(parent:GetChildren()) do
  330. if (v:IsA("BasePart")) then
  331. if (last) then
  332. local w = Instance.new("Weld")
  333. w.Name = ("%s_Weld"):format(v.Name)
  334. w.Part0,w.Part1 = last,v
  335. w.C0 = last.CFrame:inverse()
  336. w.C1 = v.CFrame:inverse()
  337. w.Parent = last
  338. end
  339. last = v
  340. table.insert(parts,v)
  341. end
  342. scan(v)
  343. end
  344. end
  345. scan(model)
  346. for _,v in pairs(parts) do
  347. v.Anchored = false
  348. v.Locked = true
  349. v.Anchored = false
  350. v.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  351. v.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  352. v.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  353. v.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  354. v.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  355. v.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  356. v.CustomPhysicalProperties = PhysicalProperties.new(0,0,0)
  357. end
  358. end
  359.  
  360. ----------------------------------------------------------------------------
  361.  
  362. function calculate(part,asd)
  363. local Head = hed
  364. local RightShoulder = asd
  365. local RightArm = part
  366. local MousePosition = mouse.Hit.p
  367. local ToMouse = (MousePosition - Head.Position).unit
  368. local Angle = math.acos(ToMouse:Dot(Vector3.new(0, 1, 0)))
  369. local FromRightArmPos = (Head.Position + Head.CFrame:vectorToWorldSpace(Vector3.new(((Head.Size.X / 2) + (RightArm.Size.X / 2)), ((Head.Size.Y / 2) - (RightArm.Size.Z / 2)), 0)))
  370. local ToMouseRightArm = ((MousePosition - FromRightArmPos) * Vector3.new(1 ,0, 1)).unit
  371. local Look = (Head.CFrame.lookVector * Vector3.new(1, 0, 1)).unit
  372. local LateralAngle = math.acos(ToMouseRightArm:Dot(Look))
  373. if tostring(LateralAngle) == "-1.#IND" then
  374. LateralAngle = 0
  375. end
  376. local Cross = Head.CFrame.lookVector:Cross(ToMouseRightArm)
  377. if LateralAngle > (math.pi / 2) then
  378. LateralAngle = (math.pi / 2)
  379. local Torso = root
  380. local Point = Torso.CFrame:vectorToObjectSpace(mouse.Hit.p-Torso.CFrame.p)
  381. if Point.Z > 0 then
  382. if Point.X > -0 and RightArm == rarm then
  383. Torso.CFrame = CFrame.new(Torso.Position,Vector3.new(mouse.Hit.X,Torso.Position.Y,mouse.Hit.Z))*CFrame.Angles(0,math.rad(110),0)
  384. elseif Point.X < 0 and RightArm == rarm then
  385. Torso.CFrame = CFrame.new(Torso.Position,Vector3.new(mouse.Hit.X,Torso.Position.Y,mouse.Hit.Z))*CFrame.Angles(0,math.rad(-110),0)
  386. end
  387. end
  388. end
  389. if Cross.Y < 0 then
  390. LateralAngle = -LateralAngle
  391. end
  392. return(CFrame.Angles(((math.pi / 2) - Angle), ((math.pi / 2) + LateralAngle), math.pi/2))
  393. end
  394.  
  395. ----------------------------------------------------------------------------
  396.  
  397. function sound(id,position,vol,pitch,start,finish)
  398. coroutine.resume(coroutine.create(function()
  399.  
  400. local part = Instance.new("Part",workspace)
  401. part.Position = position
  402. part.Size = Vector3.new(0,0,0)
  403. part.CanCollide = false
  404. part.Transparency = 1
  405.  
  406. local sound = Instance.new("Sound",part)
  407.  
  408. sound.SoundId = "rbxassetid://"..id
  409.  
  410. repeat rs:wait() until sound.IsLoaded
  411.  
  412. if vol ~= nil then
  413. sound.Volume = vol
  414. end
  415.  
  416. if pitch ~= nil then
  417. sound.PlaybackSpeed = pitch
  418. end
  419.  
  420. if start ~= nil then
  421. sound.TimePosition = start
  422. end
  423.  
  424. if finish ~= nil then
  425. debris:AddItem(part,finish-start)
  426. else
  427. debris:AddItem(part,sound.TimeLength)
  428. end
  429.  
  430. sound:Play()
  431.  
  432. return sound
  433.  
  434. end))
  435. end
  436.  
  437. ----------------------------------------------------------------------------
  438.  
  439. function computeDirection(vec)
  440. local lenSquared = vec.magnitude * vec.magnitude
  441. local invSqrt = 1 / math.sqrt(lenSquared)
  442. return Vector3.new(vec.x * invSqrt, vec.y * invSqrt, vec.z * invSqrt)
  443. end
  444.  
  445. ----------------------------------------------------------------------------
  446.  
  447. local shaking = 0
  448. function shake(num) if num > shaking then shaking = num end end
  449. game:GetService("RunService").RenderStepped:connect(function()
  450. hum.CameraOffset = Vector3.new(math.random(-1,1),math.random(-1,1),math.random(-1,1))*(shaking/100)
  451. if shaking > 0 then shaking = shaking - 1 else shaking = 0 end
  452. end)
  453.  
  454. plr = game:GetService("Players").LocalPlayer
  455. DebrisModel = Instance.new("Model",plr.Character)
  456. DebrisModel.Name = "DebrisModel"
  457.  
  458. function Effect(mesh,size,transparency,material,color,position,rotation,positionchange,sizechange,rotationchange,transparencychange,acceleration)
  459.  
  460. local part = Instance.new("Part",DebrisModel)
  461. part.Anchored = true
  462. part.CanCollide = false
  463. part.Size = Vector3.new(1,1,1)
  464. part.Transparency = transparency
  465. part.Material = material
  466. part.Color = color
  467. part.CFrame = CFrame.new(position)*CFrame.Angles(math.rad(rotation.X),math.rad(rotation.Y),math.rad(rotation.Z))
  468.  
  469. local partmesh = Instance.new("SpecialMesh",part)
  470. if tonumber(mesh) == nil then partmesh.MeshType = mesh else partmesh.MeshId = "rbxassetid://"..mesh end
  471. partmesh.Scale = size
  472.  
  473. local pvalue = Instance.new("Vector3Value",part)
  474. pvalue.Name = "Position"
  475. pvalue.Value = positionchange
  476.  
  477. local svalue = Instance.new("Vector3Value",part)
  478. svalue.Name = "Size"
  479. svalue.Value = sizechange
  480.  
  481. local rvalue = Instance.new("Vector3Value",part)
  482. rvalue.Name = "Rotation"
  483. rvalue.Value = rotationchange
  484.  
  485. local tvalue = Instance.new("NumberValue",part)
  486. tvalue.Name = "Transparency"
  487. tvalue.Value = transparencychange
  488.  
  489. local avalue = Instance.new("NumberValue",part)
  490. avalue.Name = "Acceleration"
  491. avalue.Value = acceleration
  492.  
  493. part.Name = "EFFECT"
  494.  
  495. return part
  496.  
  497. end
  498.  
  499. game:GetService("RunService").RenderStepped:connect(function()
  500. coroutine.resume(coroutine.create(function()
  501.  
  502. for i, v in pairs(DebrisModel:GetChildren()) do
  503. if v:isA("BasePart") then
  504. v.LocalTransparencyModifier = 0
  505. end
  506. end
  507.  
  508. if not plr.Character:FindFirstChild("DebrisModel") then
  509. DebrisModel = Instance.new("Model",plr.Character)
  510. DebrisModel.Name = "DebrisModel"
  511. end
  512.  
  513. for i,v in pairs(DebrisModel:GetChildren()) do
  514. if v:IsA("BasePart") and v.Name == "EFFECT" then
  515. local pvalue = v:FindFirstChild("Position").Value
  516. local svalue = v:FindFirstChild("Size").Value
  517. local rvalue = v:FindFirstChild("Rotation").Value
  518. local tvalue = v:FindFirstChild("Transparency").Value
  519. local avalue = v:FindFirstChild("Acceleration").Value
  520. local mesh = v:FindFirstChild("Mesh")
  521. mesh.Scale = mesh.Scale + svalue
  522. v:FindFirstChild("Size").Value = v:FindFirstChild("Size").Value + (Vector3.new(1,1,1)*avalue)
  523. v.Transparency = v.Transparency + tvalue
  524. v.CFrame = CFrame.new(pvalue)*v.CFrame*CFrame.Angles(math.rad(rvalue.X),math.rad(rvalue.Y),math.rad(rvalue.Z))
  525. if v.Transparency >= 1 or mesh.Scale.X < 0 or mesh.Scale.Y < 0 or mesh.Scale.Z < 0 then
  526. v:Destroy()
  527. end
  528. end
  529. end
  530.  
  531. end))
  532. end)
  533.  
  534. local wsback = 0
  535. local frozen = false
  536. function freeze()
  537. if frozen == false then
  538. frozen = true
  539. wsback = hum.WalkSpeed
  540. hum.WalkSpeed = 1
  541. else
  542. frozen = false
  543. hum.WalkSpeed = wsback
  544. end
  545. end
  546. hum.WalkSpeed = 25
  547.  
  548. function Lightning(Part0,Part1,Times,Offset,Color,Thickness,Trans)
  549. local magz = (Part0 - Part1).magnitude
  550. local curpos = Part0
  551. local trz = {-Offset,Offset}
  552. for i=1,Times do
  553. local li = Instance.new("Part", DebrisModel)
  554. li.TopSurface =0
  555. li.Material = Enum.Material.Neon
  556. li.BottomSurface = 0
  557. li.Anchored = true
  558. li.Locked = true
  559. li.Transparency = Trans or 0.4
  560. li.Color = Color
  561. li.formFactor = "Custom"
  562. li.CanCollide = false
  563. li.Size = Vector3.new(Thickness,Thickness,magz/Times)
  564. local lim = Instance.new("BlockMesh",li)
  565. local Offzet = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)])
  566. local trolpos = CFrame.new(curpos,Part1)*CFrame.new(0,0,magz/Times).p+Offzet
  567. if Times == i then
  568. local magz2 = (curpos - Part1).magnitude
  569. li.Size = Vector3.new(Thickness,Thickness,magz2)
  570. li.CFrame = CFrame.new(curpos,Part1)*CFrame.new(0,0,-magz2/2)
  571. else
  572. li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/Times/2)
  573. end
  574. curpos = li.CFrame*CFrame.new(0,0,magz/Times/2).p
  575. li.Name = "LIGHTNING"
  576. end
  577. end
  578.  
  579. ----------------------------------------------------------------------------
  580. skin_color = BrickColor.new("Light orange")
  581. --p:ClearCharacterAppearance()
  582. --hed:WaitForChild("face"):Destroy()
  583. hed:WaitForChild("face").Texture = "rbxassetid://407320095"
  584. ----------------------------------------------------------------------------
  585. local size = 1
  586.  
  587. newWeld(torso, larm, -1.5, 0.5, 0)
  588. larm.Weld.C1 = CFrame.new(0, 0.5, 0)
  589. newWeld(torso, rarm, 1.5, 0.5, 0)
  590. rarm.Weld.C1 = CFrame.new(0, 0.5, 0)
  591. newWeld(torso, hed, 0, 1.5, 0)
  592. newWeld(torso, lleg, -0.5, -1, 0)
  593. lleg.Weld.C1 = CFrame.new(0, 1, 0)
  594. newWeld(torso, rleg, 0.5, -1, 0)
  595. rleg.Weld.C1 = CFrame.new(0, 1, 0)
  596. newWeld(root, torso, 0, -1, 0)
  597. torso.Weld.C1 = CFrame.new(0, -1, 0)
  598.  
  599. emitters={}
  600.  
  601. ----------------------------------------------------------------------------------------
  602. music(288494027)
  603. velocityYFall=0
  604. velocityYFall2=0
  605. velocityYFall3=0
  606. velocityYFall4=0
  607. neckrotY=0
  608. neckrotY2=0
  609. torsorotY=0
  610. torsorotY2=0
  611. torsoY=0
  612. torsoY2=0
  613. colored = 0
  614. sine = 0
  615. change=0.4
  616. movement=10
  617. timeranim=0
  618. running = false
  619. jumped = false
  620. icolor=1
  621. imode=false
  622.  
  623. didjump = false
  624. jumppower = 0
  625. debounceimpact = false
  626.  
  627. function jumpimpact()
  628. if debounceimpact == false then
  629. debounceimpact = true
  630. if jumppower < -150 then jumppower = -150 end
  631. shake(-jumppower/5)
  632. for i=1,-jumppower/20 do rs:wait()
  633. hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(0,0,0), 0.05)
  634. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, (jumppower/20)-hum.HipHeight, 0) * CFrame.Angles(math.rad(0),math.rad(0), math.rad(0)), 0.05)
  635. end
  636. debounceimpact = false
  637. end
  638. end
  639.  
  640. max = 0
  641.  
  642. rs:connect(function()
  643.  
  644. for i,v in pairs(DebrisModel:GetChildren()) do
  645. if v.Name == "LIGHTNING" then
  646. local vm = v:FindFirstChildOfClass("BlockMesh")
  647. vm.Scale = vm.Scale - Vector3.new(0.1,0.1,0)
  648. if vm.Scale.X <= 0 then
  649. v:Destroy()
  650. end
  651. end
  652. end
  653.  
  654. if p.Character.Parent == nil then
  655. local model = Instance.new("Model")
  656. model.Name = p.Name
  657. p.Character = model
  658. for i,v in pairs(char:GetChildren()) do
  659. v.Parent = p.Character
  660. end
  661. end
  662.  
  663. char = p.Character
  664. if p.Character.Parent ~= workspace then
  665. p.Character.Parent = workspace
  666. end
  667. for i,v in pairs(char:GetChildren()) do
  668. if v:IsA("Accoutrement") then
  669. if v.Handle:FindFirstChild("Mesh") then
  670. v.Handle:FindFirstChild("Mesh").Offset = Vector3.new()
  671. v.Handle.Transparency = 0
  672. end
  673. elseif v:IsA("BasePart") then
  674. v.Anchored = false
  675. if v:FindFirstChildOfClass("BodyPosition") then
  676. v:FindFirstChildOfClass("BodyPosition"):Destroy()
  677. end
  678. if v:FindFirstChildOfClass("BodyVelocity") then
  679. v:FindFirstChildOfClass("BodyVelocity"):Destroy()
  680. end
  681. if v:FindFirstChildOfClass("BodyGyro") and v:FindFirstChildOfClass("BodyGyro").Name ~= "lolnochara" then
  682. v:FindFirstChildOfClass("BodyGyro"):Destroy()
  683. end
  684. if v:FindFirstChild("Mesh") then
  685. v:FindFirstChild("Mesh").Offset = Vector3.new()
  686. end
  687. if not DebrisModel:FindFirstChild(v.Name.."FORCEFIELD") then
  688. local force = Instance.new("Part",DebrisModel)
  689. force.Name = v.Name.."FORCEFIELD"
  690. if v ~= hed then
  691. force.Size = v.Size+(Vector3.new(1,1,1)*0.2)
  692. else
  693. force.Size = (Vector3.new(1,1,1)*v.Size.Y)+(Vector3.new(1,1,1)*0.2)
  694. end
  695. force.CanCollide = false
  696. force.Transparency = 1
  697. force.Color = Color3.new(0,1,1)
  698. force.Material = Enum.Material.Neon
  699. newWeld(v,force,0,0,0)
  700. else
  701. if not DebrisModel:FindFirstChild(v.Name.."FORCEFIELD"):FindFirstChildOfClass("Weld") then
  702. newWeld(v,DebrisModel:FindFirstChild(v.Name.."FORCEFIELD"),0,0,0)
  703. end
  704. end
  705. if v.Name ~= "HumanoidRootPart" then
  706. v.Transparency = 0
  707. else
  708. v.Transparency = 1
  709. end
  710. end
  711. end
  712.  
  713. if -root.Velocity.Y/1.5 > -5 and -root.Velocity.Y/1.5 < 150 then
  714. velocityYFall = root.Velocity.Y/1.5
  715. else
  716. if -root.Velocity.Y/1.5 < -5 then
  717. velocityYFall = 5
  718. elseif -root.Velocity.Y/1.5 > 150 then
  719. velocityYFall = -150
  720. end
  721. end
  722.  
  723. if -root.Velocity.Y/180 > 0 and -root.Velocity.Y/180 < 1.2 then
  724. velocityYFall2 = root.Velocity.Y/180
  725. else
  726. if -root.Velocity.Y/180 < 0 then
  727. velocityYFall2 = 0
  728. elseif -root.Velocity.Y/180 > 1.2 then
  729. velocityYFall2 = -1.2
  730. end
  731. end
  732.  
  733. if -root.Velocity.Y/1.5 > -5 and -root.Velocity.Y/1.5 < 50 then
  734. velocityYFall3 = root.Velocity.Y/1.5
  735. else
  736. if -root.Velocity.Y/1.5 < -5 then
  737. velocityYFall3 = 5
  738. elseif -root.Velocity.Y/1.5 > 50 then
  739. velocityYFall3 = -50
  740. end
  741. end
  742.  
  743. if -root.Velocity.Y/1.5 > -50 and -root.Velocity.Y/1.5 < 20 then
  744. velocityYFall4 = root.Velocity.Y/1.5
  745. else
  746. if -root.Velocity.Y/180 < -5 then
  747. velocityYFall4 = 5
  748. elseif -root.Velocity.Y/180 > 50 then
  749. velocityYFall4 = -50
  750. end
  751. end
  752.  
  753. if root.RotVelocity.Y/6 < 1 and root.RotVelocity.Y/6 > -1 then
  754. neckrotY = root.RotVelocity.Y/6
  755. else
  756. if root.RotVelocity.Y/6 < -1 then
  757. neckrotY = -1
  758. elseif root.RotVelocity.Y/6 > 1 then
  759. neckrotY = 1
  760. end
  761. end
  762.  
  763. if root.RotVelocity.Y/8 < 0.6 and root.RotVelocity.Y/8 > -0.6 then
  764. neckrotY2 = root.RotVelocity.Y/8
  765. else
  766. if root.RotVelocity.Y/8 < -0.6 then
  767. neckrotY2 = -0.6
  768. elseif root.RotVelocity.Y/8 > 0.6 then
  769. neckrotY2 = 0.6
  770. end
  771. end
  772.  
  773. if root.RotVelocity.Y/6 < 0.2 and root.RotVelocity.Y/6 > -0.2 then
  774. torsorotY = root.RotVelocity.Y/6
  775. else
  776. if root.RotVelocity.Y/6 < -0.2 then
  777. torsorotY = -0.2
  778. elseif root.RotVelocity.Y/6 > 0.2 then
  779. torsorotY = 0.2
  780. end
  781. end
  782.  
  783. if root.RotVelocity.Y/8 < 0.2 and root.RotVelocity.Y/8 > -0.2 then
  784. torsorotY2 = root.RotVelocity.Y/8
  785. else
  786. if root.RotVelocity.Y/8 < -0.2 then
  787. torsorotY2 = -0.2
  788. elseif root.RotVelocity.Y/8 > 0.2 then
  789. torsorotY2 = 0.2
  790. end
  791. end
  792.  
  793. torsoY = -(torso.Velocity*Vector3.new(1, 0, 1)).magnitude/20
  794. torsoY2 = -(torso.Velocity*Vector3.new(1, 0, 1)).magnitude/36
  795.  
  796. local ray1 = Ray.new(root.Position+Vector3.new(size,0,0),Vector3.new(0, -4, 0))
  797. local part1, endPoint = workspace:FindPartOnRay(ray1, char)
  798.  
  799. local ray2 = Ray.new(root.Position-Vector3.new(size,0,0),Vector3.new(0, -4, 0))
  800. local part2, endPoint = workspace:FindPartOnRay(ray2, char)
  801.  
  802. local ray3 = Ray.new(root.Position+Vector3.new(0,0,size/2),Vector3.new(0, -4, 0))
  803. local part3, endPoint = workspace:FindPartOnRay(ray3, char)
  804.  
  805. local ray4 = Ray.new(root.Position-Vector3.new(0,0,size/2),Vector3.new(0, -4, 0))
  806. local part4, endPoint = workspace:FindPartOnRay(ray4, char)
  807.  
  808. local ray5 = Ray.new(root.Position+Vector3.new(size,0,size/2),Vector3.new(0, -4, 0))
  809. local part5, endPoint = workspace:FindPartOnRay(ray5, char)
  810.  
  811. local ray6 = Ray.new(root.Position-Vector3.new(size,0,size/2),Vector3.new(0, -4, 0))
  812. local part6, endPoint = workspace:FindPartOnRay(ray6, char)
  813.  
  814. local ray7 = Ray.new(root.Position+Vector3.new(size,0,-size/2),Vector3.new(0, -4, 0))
  815. local part7, endPoint = workspace:FindPartOnRay(ray7, char)
  816.  
  817. local ray8 = Ray.new(root.Position-Vector3.new(size,0,-size/2),Vector3.new(0, -4, 0))
  818. local part8, endPoint = workspace:FindPartOnRay(ray8, char)
  819.  
  820. local ray = Ray.new(root.Position,Vector3.new(0, -6, 0))
  821. local part, endPoint = workspace:FindPartOnRay(ray, char)
  822.  
  823. if part1 or part2 or part3 or part4 or part5 or part6 or part7 or part8 then jumped = false else endPoint = 0 jumped = true end
  824.  
  825. local rlegray = Ray.new(rleg.Position+Vector3.new(0,size/2,0),Vector3.new(0, -1.75, 0))
  826. local rlegpart, rlegendPoint = workspace:FindPartOnRay(rlegray, char)
  827.  
  828. local llegray = Ray.new(lleg.Position+Vector3.new(0,size/2,0),Vector3.new(0, -1.75, 0))
  829. local llegpart, llegendPoint = workspace:FindPartOnRay(llegray, char)
  830.  
  831. if hum.Health > 0 and noidle == false then
  832. if hum.Sit == false then
  833. if (torso.Velocity*Vector3.new(1, 0, 1)).magnitude >= 5 and jumped == false then
  834. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0, 1.5, -.2) * CFrame.Angles(math.rad((torso.Velocity*Vector3.new(1, 0, 1)).magnitude/35),torsorotY, math.rad(0)+torsorotY), 0.4)
  835. hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles((change/10)*math.cos(sine/2)+0.1,-(change/10)*math.cos(sine/4)-(torsorotY/5),(change/5)*math.cos(sine/4)), 0.1)
  836. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.62-(movement/40)*math.cos(sine/4)/3,(movement/150)+(movement/40)*math.cos(sine/4))*CFrame.Angles(math.rad(-5-(movement*2)*math.cos(sine/4))+ -(movement/10)*math.sin(sine/4)*2,math.rad(0-(movement*2)*math.cos(sine/4)),math.rad(0)), 0.2)
  837. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.62+(movement/40)*math.cos(sine/4)/3,(movement/150)-(movement/40)*math.cos(sine/4))*CFrame.Angles(math.rad(-5+(movement*2)*math.cos(sine/4))+ (movement/10)*math.sin(sine/4)*2,math.rad(0-(movement*2)*math.cos(sine/4)),math.rad(0)), 0.2)
  838. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -0.5+(change*2)*math.sin(sine/2), 0) * CFrame.Angles(math.rad(30+(change*20)-(movement/20)*math.cos(sine/2)), torsorotY2+math.rad(0-20*math.sin(sine/4)), torsorotY2+math.rad(0-1*math.cos(sine/4))), 0.1)
  839. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5,(-0.85-(movement/15)*math.cos(sine/4)/2),-0.1+(movement/15)*math.cos(sine/4))*CFrame.Angles(math.rad(-50+(change*5)-movement*math.cos(sine/4))+ -(movement/10)*math.sin(sine/4),math.rad(0+(movement*2)*math.cos(sine/4)),math.rad(0)), 0.2)
  840. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5,(-0.85+(movement/15)*math.cos(sine/4)/2),-0.1-(movement/15)*math.cos(sine/4))*CFrame.Angles(math.rad(-50+(change*5)+movement*math.cos(sine/4))+ (movement/10)*math.sin(sine/4),math.rad(0+(movement*2)*math.cos(sine/4)),math.rad(0)), 0.2)
  841. elseif jumped == true then
  842. didjump = true
  843. jumppower = root.Velocity.Y
  844. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0, 1.5, -.1) * CFrame.Angles(0,0,0), 0.4)
  845. hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(0,0,0), 0.1)
  846. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.55,0) * CFrame.Angles(math.rad(0),math.rad(0), math.rad(0)), 0.1)
  847. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.55,0) * CFrame.Angles(math.rad(0),math.rad(0), math.rad(0)), 0.1)
  848. torso.Weld.C0 = CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(math.random(-90,90)),math.rad(0), math.rad(math.random(-180,180)))
  849. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5,-0.925,0) * CFrame.Angles(math.rad(0),math.rad(0), math.rad(0)), 0.1)
  850. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5,0,-0.8) * CFrame.Angles(math.rad(0),math.rad(0), math.rad(0)), 0.1)
  851. elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 5 then
  852. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0, 1.5, -.1), 0.4)
  853. hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(math.rad(0+50*math.sin(sine/4)),0,0), 0.1)
  854. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.55,-0.05-0.2*math.cos(sine/4))*CFrame.Angles(math.rad(0+80*math.sin(sine/4)),math.rad(-5-5*math.sin(sine/8)),math.rad(-6+2*math.cos(sine/8))), 0.2)
  855. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.55,-0.05-0.2*math.cos(sine/4))*CFrame.Angles(math.rad(0+80*math.sin(sine/4)),math.rad(5+5*math.sin(sine/8)),math.rad(6-2*math.cos(sine/8))), 0.2)
  856. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1.1-hum.HipHeight, 0+2*math.cos(sine/4)) * CFrame.Angles(math.rad(0-80*math.cos(sine/4)),math.rad(0), math.rad(0-1*math.cos(sine/32))), 0.1)
  857. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(0,llegendPoint.Y-lleg.Position.Y,0)*CFrame.new(-0.5,0,0)*CFrame.Angles(math.rad(0+120*math.cos(sine/4)),math.rad(10),math.rad(-5+1*math.cos(sine/16))), 0.1)
  858. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0,rlegendPoint.Y-rleg.Position.Y,0)*CFrame.new(0.5,0,0)*CFrame.Angles(math.rad(0+120*math.cos(sine/4)),math.rad(-10),math.rad(5+1*math.cos(sine/16))), 0.1)
  859. end
  860.  
  861. else
  862. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0, 1.5, -.1), 0.4)
  863. hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(0.05*math.sin(sine/16)+0.15,0.05*math.cos(sine/32),0.01*math.cos(sine/32)), 0.1)
  864. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.55-(0.1)*math.cos(sine/16)/3,-0.05-0.1*math.cos(sine/16))*CFrame.Angles(math.rad(-2+4*math.sin(sine/16)),math.rad(-5-5*math.sin(sine/16)),math.rad(-6+2*math.cos(sine/16))), 0.2)
  865. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.55-(0.1)*math.cos(sine/16)/3,-0.05-0.1*math.cos(sine/16))*CFrame.Angles(math.rad(-2+4*math.sin(sine/16)),math.rad(5+5*math.sin(sine/16)),math.rad(6-2*math.cos(sine/16))), 0.2)
  866. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1.4-(0.1)*math.cos(sine/16)-hum.HipHeight, 0) * CFrame.Angles(math.rad(0-2*math.cos(sine/16)),math.rad(0), math.rad(0-1*math.cos(sine/32))), 0.1)
  867. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5,-0.55+(0.1)*math.cos(sine/16),0)*CFrame.Angles(math.rad(80+2*math.cos(sine/16)),math.rad(4),math.rad(-2+1*math.cos(sine/32))), 0.2)
  868. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5,-0.55+(0.1)*math.cos(sine/16),0)*CFrame.Angles(math.rad(80+2*math.cos(sine/16)),math.rad(-4),math.rad(2+1*math.cos(sine/32))), 0.2)
  869. end
  870.  
  871. end
  872. if didjump == true and jumped == false and jumppower < 0 then
  873. didjump = false
  874. jumpimpact()
  875. end
  876.  
  877. sine = sine + change
  878. hum.Health = math.huge
  879. hum.MaxHealth = math.huge
  880. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement