Advertisement
waconline

doge admin

Feb 15th, 2020
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.20 KB | None | 0 0
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,game,owner = owner,game
  4. local RealPlayer = Player
  5. do
  6. print("FE Compatibility code V2 by Mokiros")
  7. local RealPlayer = RealPlayer
  8. script.Parent = RealPlayer.Character
  9.  
  10. --Fake event to make stuff like Mouse.KeyDown work
  11. local Disconnect_Function = function(this)
  12. this[1].Functions[this[2]] = nil
  13. end
  14. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  15. local FakeEvent_Metatable = {__index={
  16. Connect = function(this,f)
  17. local i = tostring(math.random(0,10000))
  18. while this.Functions[i] do
  19. i = tostring(math.random(0,10000))
  20. end
  21. this.Functions[i] = f
  22. return setmetatable({this,i},Disconnect_Metatable)
  23. end
  24. }}
  25. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  26. local function fakeEvent()
  27. return setmetatable({Functions={}},FakeEvent_Metatable)
  28. end
  29.  
  30. --Creating fake input objects with fake variables
  31. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  32. FakeMouse.keyUp = FakeMouse.KeyUp
  33. FakeMouse.keyDown = FakeMouse.KeyDown
  34. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  35. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  36. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  37. end}
  38. --Merged 2 functions into one by checking amount of arguments
  39. CAS.UnbindAction = CAS.BindAction
  40.  
  41. --This function will trigger the events that have been :Connect()'ed
  42. local function TriggerEvent(self,ev,...)
  43. for _,f in pairs(self[ev].Functions) do
  44. f(...)
  45. end
  46. end
  47. FakeMouse.TriggerEvent = TriggerEvent
  48. UIS.TriggerEvent = TriggerEvent
  49.  
  50. --Client communication
  51. local Event = Instance.new("RemoteEvent")
  52. Event.Name = "UserInput_Event"
  53. Event.OnServerEvent:Connect(function(plr,io)
  54. if plr~=RealPlayer then return end
  55. FakeMouse.Target = io.Target
  56. FakeMouse.Hit = io.Hit
  57. if not io.isMouse then
  58. local b = io.UserInputState == Enum.UserInputState.Begin
  59. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  60. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  61. end
  62. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  63. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  64. end
  65. for _,t in pairs(CAS.Actions) do
  66. for _,k in pairs(t.Keys) do
  67. if k==io.KeyCode then
  68. t.Function(t.Name,io.UserInputState,io)
  69. end
  70. end
  71. end
  72. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  73. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  74. end
  75. end)
  76. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  77. local Mouse = owner:GetMouse()
  78. local UIS = game:GetService("UserInputService")
  79. local input = function(io,RobloxHandled)
  80. if RobloxHandled then return end
  81. --Since InputObject is a client-side instance, we create and pass table instead
  82. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  83. end
  84. UIS.InputBegan:Connect(input)
  85. UIS.InputEnded:Connect(input)
  86.  
  87. local h,t
  88. --Give the server mouse data every second frame, but only if the values changed
  89. --If player is not moving their mouse, client won't fire events
  90. local HB = game:GetService("RunService").Heartbeat
  91. while true do
  92. if h~=Mouse.Hit or t~=Mouse.Target then
  93. h,t=Mouse.Hit,Mouse.Target
  94. Event:FireServer({isMouse=true,Target=t,Hit=h})
  95. end
  96. --Wait 2 frames
  97. for i=1,2 do
  98. HB:Wait()
  99. end
  100. end]==],script)
  101.  
  102. ----Sandboxed game object that allows the usage of client-side methods and services
  103. --Real game object
  104. local RealGame = game
  105.  
  106. --Metatable for fake service
  107. local FakeService_Metatable = {
  108. __index = function(self,k)
  109. local s = rawget(self,"_RealService")
  110. if s then
  111. return typeof(s[k])=="function"
  112. and function(_,...)return s[k](s,...)end or s[k]
  113. end
  114. end,
  115. __newindex = function(self,k,v)
  116. local s = rawget(self,"_RealService")
  117. if s then s[k]=v end
  118. end
  119. }
  120. local function FakeService(t,RealService)
  121. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  122. return setmetatable(t,FakeService_Metatable)
  123. end
  124.  
  125. --Fake game object
  126. local FakeGame = {
  127. GetService = function(self,s)
  128. return rawget(self,s) or RealGame:GetService(s)
  129. end,
  130. Players = FakeService({
  131. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  132. },"Players"),
  133. UserInputService = FakeService(UIS,"UserInputService"),
  134. ContextActionService = FakeService(CAS,"ContextActionService"),
  135. RunService = FakeService({
  136. _btrs = {},
  137. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  138. BindToRenderStep = function(self,name,_,fun)
  139. self._btrs[name] = self.Heartbeat:Connect(fun)
  140. end,
  141. UnbindFromRenderStep = function(self,name)
  142. self._btrs[name]:Disconnect()
  143. end,
  144. },"RunService")
  145. }
  146. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  147. FakeGame.service = FakeGame.GetService
  148. FakeService(FakeGame,game)
  149. --Changing owner to fake player object to support owner:GetMouse()
  150. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  151. end
  152. local function QuaternionFromCFrame(cf)
  153. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  154. local trace = m00 + m11 + m22
  155. if trace > 0 then
  156. local s = math.sqrt(1 + trace)
  157. local recip = 0.5/s
  158. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  159. else
  160. local i = 0
  161. if m11 > m00 then
  162. i = 1
  163. end
  164. if m22 > (i == 0 and m00 or m11) then
  165. i = 2
  166. end
  167. if i == 0 then
  168. local s = math.sqrt(m00-m11-m22+1)
  169. local recip = 0.5/s
  170. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  171. elseif i == 1 then
  172. local s = math.sqrt(m11-m22-m00+1)
  173. local recip = 0.5/s
  174. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  175. elseif i == 2 then
  176. local s = math.sqrt(m22-m00-m11+1)
  177. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  178. end
  179. end
  180. end
  181. local function QuaternionToCFrame(px, py, pz, x, y, z, w)
  182. local xs, ys, zs = x + x, y + y, z + z
  183. local wx, wy, wz = w*xs, w*ys, w*zs
  184. local xx = x*xs
  185. local xy = x*ys
  186. local xz = x*zs
  187. local yy = y*ys
  188. local yz = y*zs
  189. local zz = z*zs
  190. 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))
  191. end
  192. local function QuaternionSlerp(a, b, t)
  193. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  194. local startInterp, finishInterp;
  195. if cosTheta >= 0.0001 then
  196. if (1 - cosTheta) > 0.0001 then
  197. local theta = math.acos(cosTheta)
  198. local invSinTheta = 1/math.sin(theta)
  199. startInterp = math.sin((1-t)*theta)*invSinTheta
  200. finishInterp = math.sin(t*theta)*invSinTheta
  201. else
  202. startInterp = 1-t
  203. finishInterp = t
  204. end
  205. else
  206. if (1+cosTheta) > 0.0001 then
  207. local theta = math.acos(-cosTheta)
  208. local invSinTheta = 1/math.sin(theta)
  209. startInterp = math.sin((t-1)*theta)*invSinTheta
  210. finishInterp = math.sin(t*theta)*invSinTheta
  211. else
  212. startInterp = t-1
  213. finishInterp = t
  214. end
  215. end
  216. 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
  217. end
  218. function clerp(a,b,t)
  219. local qa = {QuaternionFromCFrame(a)}
  220. local qb = {QuaternionFromCFrame(b)}
  221. local ax, ay, az = a.x, a.y, a.z
  222. local bx, by, bz = b.x, b.y, b.z
  223. local _t = 1-t
  224. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  225. end
  226.  
  227. do --the animating
  228. plr = game:service'Players'.LocalPlayer
  229. char = plr.Character
  230. mouse = plr:GetMouse()
  231. humanoid = char:findFirstChild("Humanoid")
  232. torso = char:findFirstChild("Torso")
  233. head = char.Head
  234. ra = char:findFirstChild("Right Arm")
  235. la = char:findFirstChild("Left Arm")
  236. rl = char:findFirstChild("Right Leg")
  237. ll = char:findFirstChild("Left Leg")
  238. rs = torso:findFirstChild("Right Shoulder")
  239. ls = torso:findFirstChild("Left Shoulder")
  240. rh = torso:findFirstChild("Right Hip")
  241. lh = torso:findFirstChild("Left Hip")
  242. neck = torso:findFirstChild("Neck")
  243. rj = char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
  244. anim = char:findFirstChild("Animate")
  245. rootpart = char:findFirstChild("HumanoidRootPart")
  246. camera = workspace.CurrentCamera
  247. if anim then
  248. anim:Destroy()
  249. end
  250.  
  251.  
  252. local rm = Instance.new("Motor", torso)
  253. rm.C0 = CFrame.new(1.5, 0.5, 0)
  254. rm.C1 = CFrame.new(0, 0.5, 0)
  255. rm.Part0 = torso
  256. rm.Part1 = ra
  257. local lm = Instance.new("Motor", torso)
  258. lm.C0 = CFrame.new(-1.5, 0.5, 0)
  259. lm.C1 = CFrame.new(0, 0.5, 0)
  260. lm.Part0 = torso
  261. lm.Part1 = la
  262.  
  263. local rlegm = Instance.new("Motor", torso)
  264. rlegm.C0 = CFrame.new(0.5, -1, 0)
  265. rlegm.C1 = CFrame.new(0, 1, 0)
  266. rlegm.Part0 = torso
  267. rlegm.Part1 = rl
  268. local llegm = Instance.new("Motor", torso)
  269. llegm.C0 = CFrame.new(-0.5, -1, 0)
  270. llegm.C1 = CFrame.new(0, 1, 0)
  271. llegm.Part0 = torso
  272. llegm.Part1 = ll
  273.  
  274. neck.C0 = CFrame.new(0, 1, 0)
  275. neck.C1 = CFrame.new(0, -0.5, 0)
  276.  
  277.  
  278. rj.C0 = CFrame.new()
  279. rj.C1 = CFrame.new()
  280.  
  281.  
  282. local sound = Instance.new("Sound", head)
  283. sound.SoundId = "http://www.roblox.com/asset/?id=130797915"
  284. sound.Volume = 0.8
  285. sound.Looped = true
  286.  
  287. for i,v in pairs(char:children()) do
  288. if v:IsA("Hat") then
  289. v:Destroy()
  290. end
  291. end
  292.  
  293.  
  294. --look of the fox here
  295. game:service'InsertService':LoadAsset(151784320):children()[1].Parent = char
  296. Instance.new("PointLight", head).Range = 10
  297.  
  298. print'sweg, madiik made dis kthx' --ogm y found meh sekret
  299.  
  300.  
  301. local speed = 0.3
  302. local angle = 0
  303. local sitting = false
  304. local humanwalk = false
  305. local anglespeed = 1
  306. rsc0 = rm.C0
  307. lsc0 = lm.C0
  308. llc0 = llegm.C0
  309. rlc0 = rlegm.C0
  310. neckc0 = neck.C0
  311.  
  312. local controllerService = game:GetService("ControllerService")
  313. local controller = controllerService:GetChildren()[1]
  314.  
  315. controller.Parent = nil
  316.  
  317. Instance.new("HumanoidController", game:service'ControllerService')
  318. Instance.new("SkateboardController", game:service'ControllerService')
  319. Instance.new("VehicleController", game:service'ControllerService')
  320. local controller = controllerService:GetChildren()[1]
  321. mouse.KeyDown:connect(function(k)
  322. if k == "q" then
  323. humanwalk = not humanwalk
  324. end
  325. if k == "z" then
  326. if not sound.IsPlaying then
  327. sound:stop()
  328. sound.SoundId = "http://www.roblox.com/asset/?id=130802245"
  329. wait()
  330. sound:play()
  331. end
  332. end
  333. if k == "x" then
  334. if not sound.IsPlaying then
  335. sound:stop()
  336. sound.SoundId = "http://www.roblox.com/asset/?id=130797915"
  337. wait()
  338. sound:play()
  339. end
  340. end
  341. if k == "c" then
  342. if not sound.IsPlaying then
  343. sound:stop()
  344. sound.SoundId = "http://www.roblox.com/asset/?id=149713968"
  345. wait()
  346. sound:play()
  347. end
  348. end
  349. if string.byte(k) == 48 then
  350. humanoid.WalkSpeed = 34
  351. end
  352.  
  353. end)
  354. mouse.KeyUp:connect(function(k)
  355.  
  356. if string.byte(k) == 48 then
  357. humanoid.WalkSpeed = 16
  358. end
  359.  
  360. end)
  361.  
  362.  
  363.  
  364. while wait() do
  365. angle = (angle % 100) + anglespeed/10
  366. mvmnt = math.pi * math.sin(math.pi*2/100*(angle*10))
  367. local rscf = rsc0
  368. local lscf = lsc0
  369. local rlcf = rlc0
  370. local llcf = llc0
  371. local rjcf = CFrame.new()
  372. local ncf = neckc0
  373. local rayz = Ray.new(rootpart.Position, Vector3.new(0, -6, 0))
  374. local hitz, enz = workspace:findPartOnRay(rayz, char)
  375. if not hitz then
  376. if sound.IsPlaying then
  377. sound:stop()
  378. end
  379.  
  380. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude > 2 then
  381.  
  382. ncf = neckc0 * CFrame.Angles(math.pi/5, 0, 0)
  383. rjcf = CFrame.new() * CFrame.Angles(-math.pi/5, math.sin(angle)*0.05, 0)
  384. rscf = rsc0 * CFrame.Angles(math.pi/1.7+math.sin(angle)*0.1, 0, 0)
  385. lscf = lsc0 * CFrame.Angles(math.pi/1.7+math.sin(-angle)*0.1, 0, 0)
  386. rlcf = rlc0 * CFrame.Angles(-math.pi/10+math.sin(-angle)*0.3, 0, 0)
  387. llcf = llc0 * CFrame.Angles(-math.pi/10+math.sin(angle)*0.3, 0, 0)
  388.  
  389. else
  390.  
  391. ncf = neckc0 * CFrame.Angles(math.pi/14, 0, 0)
  392. rjcf = CFrame.new() * CFrame.Angles(-math.pi/18, math.sin(angle)*0.05, 0)
  393. rscf = rsc0 * CFrame.Angles(-math.pi/10+math.sin(angle)*0.2, 0, 0)
  394. lscf = lsc0 * CFrame.Angles(-math.pi/10+math.sin(-angle)*0.2, 0, 0)
  395. rlcf = rlc0 * CFrame.new(0, 0.7, -0.5) CFrame.Angles(-math.pi/14, 0, 0)
  396. llcf = llc0 * CFrame.Angles(-math.pi/20, 0, 0)
  397.  
  398. end
  399. elseif humanoid.Sit then
  400. if sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=130797915" then
  401. anglespeed = 6
  402. ncf = neckc0 * CFrame.Angles(math.pi/5-math.sin(angle)*0.1, 0, 0)
  403. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, 0, 0)
  404. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  405. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  406. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  407. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  408. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=135570347" then
  409. anglespeed = 4
  410. ncf = neckc0 * CFrame.Angles(math.pi/5-math.abs(math.sin(angle))*0.3, 0, 0)
  411. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, 0, 0)
  412. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  413. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  414. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  415. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  416. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=149713968" then
  417. anglespeed = 2
  418. ncf = neckc0 * CFrame.Angles(math.pi/5, 0, math.sin(angle)*0.08)
  419. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, math.sin(angle)*0.01, 0)
  420. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  421. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  422. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  423. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  424. else
  425. anglespeed = 1/2
  426. ncf = neckc0 * CFrame.Angles(math.pi/5, 0, math.sin(angle)*0.08)
  427. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, math.sin(angle)*0.01, 0)
  428. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  429. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  430. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  431. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  432. end
  433. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude < 2 then
  434. if sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=130797915" then
  435. anglespeed = 6
  436. ncf = neckc0 * CFrame.Angles(math.pi/10-math.sin(angle)*0.07, 0, 0)
  437. rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(-math.pi/10, math.sin(angle)*0.001, 0)
  438. rscf = rsc0 * CFrame.Angles(math.pi/1+math.sin(angle)*0.5, 0, 0)
  439. lscf = lsc0 * CFrame.Angles(math.pi/1+math.sin(angle)*0.5, 0, 0)
  440. rlcf = rlc0 * CFrame.Angles(math.pi/10, math.sin(angle)*0.08, math.rad(6.5))
  441. llcf = llc0 * CFrame.Angles(math.pi/10, -math.sin(angle)*0.08, -math.rad(6.5))
  442. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=149713968" then
  443. anglespeed = 2
  444. ncf = neckc0 * CFrame.Angles(math.pi/10-math.abs(math.sin(angle))*0.3, 0, 0)
  445. rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(-math.pi/20, math.sin(angle)*0.001, 0)
  446. rscf = rsc0 * CFrame.Angles(math.pi/2+math.abs(math.sin(angle)*1), 0, 0)
  447. lscf = lsc0 * CFrame.Angles(math.pi/2+math.abs(math.sin(angle)*1), 0, 0)
  448. rlcf = rlc0 * CFrame.Angles(math.pi/20, math.sin(angle)*0.08, math.rad(2.5))
  449. llcf = llc0 * CFrame.Angles(math.pi/20, -math.sin(angle)*0.08, -math.rad(2.5))
  450. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=130802245" then
  451. anglespeed = 3
  452. ncf = neckc0 * CFrame.Angles(math.sin(angle)*0.07, math.rad(30), 0)
  453. rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(0, math.sin(angle)*0.001, 0)
  454. rscf = rsc0 * CFrame.Angles(math.sin(angle)*0.05, 0, 0)
  455. lscf = lsc0 * CFrame.Angles(math.sin(-angle)*0.05, 0, 0)
  456. rlcf = rlc0 * CFrame.new(0, -0.1 + math.abs(mvmnt)*0.1, -0.1) * CFrame.Angles(0, math.rad(5), math.rad(5))
  457. llcf = llc0 * CFrame.Angles(0, math.rad(2.5), math.rad(1))
  458. else
  459. if humanwalk then
  460. anglespeed = 1/4
  461. ncf = neckc0 * CFrame.Angles(-math.sin(angle)*0.07, 0, 0)
  462. rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(0, math.sin(angle)*0.001, 0)
  463. rscf = rsc0 * CFrame.Angles(math.sin(angle)*0.1, 0, 0)
  464. lscf = lsc0 * CFrame.Angles(math.sin(-angle)*0.1, 0, 0)
  465. rlcf = rlc0 * CFrame.Angles(0, math.sin(angle)*0.08, math.rad(2.5))
  466. llcf = llc0 * CFrame.Angles(0, -math.sin(angle)*0.08, -math.rad(2.5))
  467. else
  468. anglespeed = 1/2
  469. ncf = neckc0 * CFrame.Angles(math.pi/5, 0, math.sin(angle)*0.08)
  470. rjcf = CFrame.new(0, -2, 0) * CFrame.Angles(-math.pi/5, math.sin(angle)*0.01, 0)
  471. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  472. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  473. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  474. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  475. end
  476. end
  477. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude < 20 then
  478. if sound.IsPlaying then
  479. sound:stop()
  480. end
  481. if humanwalk then
  482. anglespeed = 4
  483. ncf = neckc0 * CFrame.Angles(math.pi/24, mvmnt*.02, 0)
  484. rjcf = CFrame.new(0, math.abs(mvmnt)*0.05, 0) * CFrame.Angles(-math.pi/24, -mvmnt*.02, 0)
  485. rscf = rsc0 * CFrame.Angles(math.sin(angle)*1.25, 0, -math.abs(mvmnt)*0.02)
  486. lscf = lsc0 * CFrame.Angles(math.sin(-angle)*1.25, 0, math.abs(mvmnt)*0.02)
  487. rlcf = rlc0 * CFrame.Angles(math.sin(-angle)*1, 0, math.rad(.5))
  488. llcf = llc0 * CFrame.Angles(math.sin(angle)*1, 0, -math.rad(.5))
  489. else
  490. anglespeed = 4
  491. ncf = neckc0 * CFrame.new(0, 0, .2) * CFrame.Angles(math.pi/1.9, 0, 0)
  492. rjcf = CFrame.new(0, -1.5+math.abs(mvmnt)*0.05, 0) * CFrame.Angles(-math.pi/1.9, math.sin(mvmnt/2)*0.05, 0)
  493. rscf = rsc0 * CFrame.new(-.45, 0.2, -.4+math.abs(mvmnt)*0.125) * CFrame.Angles(math.pi/2+math.sin(angle)*0.7, 0, math.rad(5))
  494. lscf = lsc0 * CFrame.new(.45, 0.2, .1-math.abs(mvmnt)*0.125) * CFrame.Angles(math.pi/2+math.sin(-angle)*0.7, 0, -math.rad(5))
  495. rlcf = rlc0 * CFrame.new(0, 0, -.3+math.abs(mvmnt)*0.125) * CFrame.Angles(math.pi/2.5+math.sin(-angle)*0.6, 0, math.abs(mvmnt)*0.025)
  496. llcf = llc0 * CFrame.new(0, 0, .3-math.abs(mvmnt)*0.125) * CFrame.Angles(math.pi/2.5+math.sin(angle)*.6, 0, -math.abs(mvmnt)*0.025)
  497. end
  498. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 20 then
  499. if sound.IsPlaying then
  500. sound:stop()
  501. end
  502. if humanwalk then
  503. anglespeed = 5
  504. ncf = neckc0 * CFrame.Angles(math.pi/20, math.sin(angle)*.04, 0)
  505. rjcf = CFrame.new(0, -.4 + math.abs(mvmnt)*0.25, 0) * CFrame.Angles(-math.pi/20, -math.sin(angle)*.08, 0)
  506. rscf = rsc0 * CFrame.new(0, 0, -.3+math.abs(mvmnt)*0.125) * CFrame.Angles(math.pi/18+math.sin(angle)*1.5, 0, -math.abs(mvmnt)*0.02)
  507. lscf = lsc0 * CFrame.new(0, 0, .3-math.abs(mvmnt)*0.125) * CFrame.Angles(math.pi/18+math.sin(-angle)*1.5, 0, math.abs(mvmnt)*0.02)
  508. rlcf = rlc0 * CFrame.new(0, 0, -.6+math.abs(mvmnt)*0.125) * CFrame.Angles(-math.pi/18+math.sin(-angle)*1.3, 0, math.rad(.5))
  509. llcf = llc0 * CFrame.new(0, 0, -math.abs(mvmnt)*0.125) * CFrame.Angles(-math.pi/18+math.sin(angle)*1.3, 0, -math.rad(.5))
  510. else
  511. anglespeed = 5.5
  512. ncf = neckc0 * CFrame.new(0, 0, .2) * CFrame.Angles(math.pi/1.9+math.sin(mvmnt/2)*0.05, 0, 0)
  513. rjcf = CFrame.new(0, -1.3+math.abs(mvmnt)*0.05, 0) * CFrame.Angles(-math.pi/1.9+math.abs(mvmnt/2)*0.1, 0, 0)
  514. rscf = rsc0 * CFrame.new(-1, 0.2, -.5) * CFrame.Angles(math.pi/2+math.sin(angle)*1.8, 0, math.rad(5))
  515. lscf = lsc0 * CFrame.new(1, 0.2, -.5) * CFrame.Angles(math.pi/2+math.sin(angle)*1.8, 0, -math.rad(5))
  516. rlcf = rlc0 * CFrame.new(0, .3-math.abs(mvmnt)*0.125, -.3+math.abs(mvmnt)*0.125) * CFrame.Angles(math.pi/2.5+math.sin(-angle)*1.4, 0, math.abs(mvmnt)*0.025)
  517. llcf = llc0 * CFrame.new(0, .3-math.abs(mvmnt)*0.125, .3-math.abs(mvmnt)*0.125) * CFrame.Angles(math.pi/2.5+math.sin(-angle)*1.4, 0, -math.abs(mvmnt)*0.025)
  518. end
  519. end
  520.  
  521. rm.C0 = clerp(rm.C0,rscf,speed)
  522. lm.C0 = clerp(lm.C0,lscf,speed)
  523. rj.C0 = clerp(rj.C0,rjcf,speed)
  524. neck.C0 = clerp(neck.C0,ncf,speed)
  525. rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  526. llegm.C0 = clerp(llegm.C0,llcf,speed)
  527. end
  528.  
  529.  
  530. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement