Advertisement
memberhero

Less Laggy Holiday Script

Jan 25th, 2019
346
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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,Mouse,mouse,UserInputService,ContextActionService = owner
  3. do
  4. print("FE Compatibility code by Mokiros")
  5. script.Parent = Player.Character
  6.  
  7. --RemoteEvent for communicating
  8. local Event = Instance.new("RemoteEvent")
  9. Event.Name = "UserInput_Event"
  10.  
  11. --Fake event to make stuff like Mouse.KeyDown work
  12. local function fakeEvent()
  13. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  14. t.connect = t.Connect
  15. return t
  16. end
  17.  
  18. --Creating fake input objects with fake variables
  19. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  20. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  21. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  22. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  23. end}
  24. --Merged 2 functions into one by checking amount of arguments
  25. CAS.UnbindAction = CAS.BindAction
  26.  
  27. --This function will trigger the events that have been :Connect()'ed
  28. local function te(self,ev,...)
  29. local t = m[ev]
  30. if t and t._fakeEvent and t.Function then
  31. t.Function(...)
  32. end
  33. end
  34. m.TrigEvent = te
  35. UIS.TrigEvent = te
  36.  
  37. Event.OnServerEvent:Connect(function(plr,io)
  38. if plr~=Player then return end
  39. if io.isMouse then
  40. m.Target = io.Target
  41. m.Hit = io.Hit
  42. else
  43. local b = io.UserInputState == Enum.UserInputState.Begin
  44. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  45. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  46. end
  47. for _,t in pairs(CAS.Actions) do
  48. for _,k in pairs(t.Keys) do
  49. if k==io.KeyCode then
  50. t.Function(t.Name,io.UserInputState,io)
  51. end
  52. end
  53. end
  54. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  55. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  56. end
  57. end)
  58. Event.Parent = NLS([==[
  59. local Player = game:GetService("Players").LocalPlayer
  60. local Event = script:WaitForChild("UserInput_Event")
  61.  
  62. local UIS = game:GetService("UserInputService")
  63. local input = function(io,a)
  64. if a then return end
  65. --Since InputObject is a client-side instance, we create and pass table instead
  66. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  67. end
  68. UIS.InputBegan:Connect(input)
  69. UIS.InputEnded:Connect(input)
  70.  
  71. local Mouse = Player:GetMouse()
  72. local h,t
  73. --Give the server mouse data 30 times every second, but only if the values changed
  74. --If player is not moving their mouse, client won't fire events
  75. while wait(1/30) do
  76. if h~=Mouse.Hit or t~=Mouse.Target then
  77. h,t=Mouse.Hit,Mouse.Target
  78. Event:FireServer({isMouse=true,Target=t,Hit=h})
  79. end
  80. end]==],Player.Character)
  81. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  82. end
  83. wait(0.2)
  84. --//Holiday Feelings//--
  85. print("Holiday Feelings")
  86. print("Made by vlad20020.")
  87. warn("This is holiday time!")
  88. print("Controls below ok")
  89. warn([[E - Hug
  90. Q - Throw snowbal
  91. F - Place a gift
  92. C - TP
  93. Z - Sit]])
  94. local plr = owner
  95. local plrg = plr.PlayerGui
  96.  
  97. local char = plr.Character
  98. local h = char:FindFirstChild("Head")
  99. local t = char:FindFirstChild("Torso")
  100. local ra = char:FindFirstChild("Right Arm")
  101. local la = char:FindFirstChild("Left Arm")
  102. local rl = char:FindFirstChild("Right Leg")
  103. local ll = char:FindFirstChild("Left Leg")
  104. local rs = t:FindFirstChild("Right Shoulder")
  105. local ls = t:FindFirstChild("Left Shoulder")
  106. local rh = t:FindFirstChild("Right Hip")
  107. local lh = t:FindFirstChild("Left Hip")
  108. local nec = t.Neck
  109. local rut = char.HumanoidRootPart
  110. local rutj = rut.RootJoint
  111. local hum = char:FindFirstChildOfClass("Humanoid")
  112. local cf1 = nec.C1
  113. local cf2 = rutj.C1
  114. local cf3 = rs.C1
  115. local cf4 = ls.C1
  116. local cf5 = rh.C1
  117. local cf6 = lh.C1
  118. local cf01 = nec.C0
  119. local cf02 = rutj.C0
  120. local cf03 = rs.C0
  121. local cf04 = ls.C0
  122. local cf05 = rh.C0
  123. local cf06 = lh.C0
  124. local p0,p1 = nec.Part0,nec.Part1
  125. local rsp0,rsp1 = rs.Part0,rs.Part1
  126. local lsp0,lsp1 = ls.Part0,ls.Part1
  127. local rhp0,rhp1 = rh.Part0,rh.Part1
  128. local lhp0,lhp1 = lh.Part0,lh.Part1
  129. local aa = 10
  130. local aaa = aa*3
  131. local change = 0
  132. local lchange = 0
  133. local sine = 1
  134. local hugtime = 1
  135. local anim = "idle"
  136. local animspeed = .005
  137. local animspeed1 = 1.5
  138. local walkanimspeed = .1
  139. local walkspeed = 16
  140. local sumthin = walkspeed/8
  141. local idlenum = 0
  142. local lsvol = 2.5
  143. local whenbored = math.random(2,6)
  144. local rad = math.rad
  145. local huge = math.huge
  146. local using = false
  147. local hugging = false
  148. local lookinaround = false
  149. local aiming = false
  150. local sitting = false
  151. local furmode = false
  152. local landed = false
  153. local readytoland = false
  154. local cangrabthecorner = false
  155. local grabbedc = false
  156. local qui = Enum.EasingStyle.Quint
  157. local io = Enum.EasingDirection.InOut
  158. local tweens = game:GetService("TweenService")
  159. local debrs = game:GetService("Debris")
  160. local gifts = {"rbxassetid://5013502","rbxassetid://1237427","rbxassetid://6109471","rbxassetid://7812400","rbxassetid://19428684"}
  161. local spart
  162. local phit
  163. local cos = math.cos
  164. local sin = math.sin
  165. local tan = math.tan
  166. local ray = Ray.new
  167. local v3 = Vector3.new
  168. cff5 = cf5 * CFrame.Angles(rad(2),rad(3),rad(0))
  169. cff6 = cf6 * CFrame.Angles(rad(2),rad(-3),rad(0))
  170. if plr.UserId == 90745958 or plr.UserId == 62574108 then
  171. furmode = true
  172. end
  173. if furmode then
  174. hugtime = 2.5
  175. print("owo uwu")
  176. end
  177. local effpart = Instance.new("Part") effpart.Size = Vector3.new(2,.1,1) effpart.Massless = true effpart.Transparency = 1 effpart.CanCollide = false effpart.Anchored = false effpart.Parent = char
  178. local grabpart = Instance.new("Part") grabpart.Size = Vector3.new(.1,.1,.1) grabpart.Massless = true grabpart.Transparency = 1 grabpart.CanCollide = false grabpart.Anchored = false grabpart.Material = "Neon" grabpart.Parent = char
  179. local pweld = Instance.new("Weld",effpart) pweld.Part0 = t pweld.Part1 = effpart pweld.C0 = CFrame.new(0,-2.2,-.5)
  180. local gweld = Instance.new("Weld",grabpart) gweld.Part0 = rut gweld.Part1 = grabpart gweld.C0 = CFrame.new(0,3,-1.4)
  181. local lsound = Instance.new("Sound",effpart) lsound.Volume = lsvol lsound.SoundId = "rbxassetid://1161221108"
  182. --//ArmJointParts~//--
  183. local tpr = Instance.new("Part",t) tpr.Size = Vector3.new(.1,.1,.1) tpr.CanCollide = false tpr.Transparency = 1 tpr.Locked = true
  184. local tpl = Instance.new("Part",t) tpl.Size = Vector3.new(.1,.1,.1) tpl.CanCollide = false tpl.Transparency = 1 tpl.Locked = true
  185. local tprw = Instance.new("Weld",t) tprw.Part0 = t tprw.Part1 = tpr tprw.C0 = CFrame.new(1,.5,0)
  186. local tplw = Instance.new("Weld",t) tplw.Part0 = t tplw.Part1 = tpl tplw.C0 = CFrame.new(-1,.5,0)
  187. --
  188. local rapr = Instance.new("Part",ra) rapr.Size = Vector3.new(.1,.1,.1) rapr.CanCollide = false rapr.Transparency = 1 rapr.Locked = true
  189. local lapl = Instance.new("Part",la) lapl.Size = Vector3.new(.1,.1,.1) lapl.CanCollide = false lapl.Transparency = 1 lapl.Locked = true
  190. local raprw = Instance.new("Weld",ra) raprw.Part0 = ra raprw.Part1 = rapr raprw.C0 = CFrame.new(-.5,.5,0)
  191. local laplw = Instance.new("Weld",la) laplw.Part0 = la laplw.Part1 = lapl laplw.C0 = CFrame.new(.5,.5,0)
  192. --/JointsWelds~//--
  193. local rsw = Instance.new("Weld",ra) rsw.Part0 = tpr rsw.Part1 = nil --Right Shoulder
  194. local lsw = Instance.new("Weld",la) lsw.Part0 = tpl lsw.Part1 = nil --Left Shoulder
  195. local bil = Instance.new("BillboardGui",char) bil.Name = "ChatFunc" bil.Adornee = h bil.Size = UDim2.new(1,0,1,0) bil.StudsOffset = Vector3.new(0,2,0)
  196. local effects = Instance.new("Model",char) effects.Name = "Effects"
  197. local noanim = true
  198. if noanim then
  199. if char:WaitForChild("Animate",1.5) then
  200. char.Animate:Destroy()
  201. end
  202. for i,v in pairs(hum:GetPlayingAnimationTracks()) do
  203. v:Stop(0)
  204. v:AdjustSpeed(0)
  205. v:AdjustWeight(math.huge)
  206. v.TimePosition = 0
  207. v:Destroy()
  208. end
  209. wait()
  210. if hum:FindFirstChildOfClass("Animator") then
  211. char.Humanoid.Animator:Destroy()
  212. end
  213. end
  214. function swait(num)
  215. game:GetService("RunService").Stepped:Wait()
  216. end
  217. function remove(instanc,timee)
  218. debrs:AddItem(instanc,timee)
  219. end
  220. function dest(hit,type)
  221. if hit:IsA("Seat") or hit:IsA("VehicleSeat") then
  222. hit.Parent = nil
  223. end
  224. hit:ClearAllChildren()
  225. hit.Anchored = false hit.CanCollide = true
  226. if hit:IsA("Part") then
  227. hit.FormFactor = "Custom"
  228. end
  229. hit.Size = v3(hit.Size.x/2,hit.Size.y/2,hit.Size.z/2)
  230. hit.CFrame = hit.CFrame * CFrame.new(hit.Size.x/2,hit.Size.y/2,hit.Size.z/2)
  231. local clone = hit:Clone() clone.Parent = workspace
  232. local clone1 = hit:Clone() clone1.Parent = workspace
  233. local clone2 = hit:Clone() clone2.Parent = workspace
  234. local clone3 = hit:Clone() clone3.Parent = workspace
  235. local clone4 = hit:Clone() clone4.Parent = workspace
  236. local clone5 = hit:Clone() clone5.Parent = workspace
  237. local clone6 = hit:Clone() clone6.Parent = workspace
  238. clone.CFrame = hit.CFrame * CFrame.new(0,-hit.Size.y,0)
  239. clone1.CFrame = hit.CFrame * CFrame.new(-hit.Size.x,-hit.Size.y,0)
  240. clone2.CFrame = hit.CFrame * CFrame.new(-hit.Size.x,0,0)
  241. clone3.CFrame = hit.CFrame * CFrame.new(0,0,-hit.Size.z)
  242. clone4.CFrame = clone.CFrame * CFrame.new(0,0,-clone.Size.z)
  243. clone5.CFrame = clone1.CFrame * CFrame.new(0,0,-clone1.Size.z)
  244. clone6.CFrame = clone2.CFrame * CFrame.new(0,0,-clone2.Size.z)
  245. local parts = {hit,clone,clone1,clone2,clone3,clone4,clone5,clone6}
  246. return parts
  247. end
  248. function rayc(spos,direc,ignore,dist)
  249. local rai = ray(spos,direc.Unit * dist)
  250. local rhit,rpos,rrot = workspace:FindPartOnRayWithIgnoreList(rai,ignore,false,false)
  251. return rhit,rpos,rrot
  252. end
  253. local tlerp = function(part,tablee,leinght,easingstyle,easingdirec)
  254. pcall(function()
  255. local info = TweenInfo.new(
  256. leinght,
  257. easingstyle,
  258. easingdirec,
  259. 0,
  260. false,
  261. 0
  262. )
  263. local lerp = tweens:Create(part,info,tablee)
  264. lerp:Play()
  265. end)
  266. end
  267. function fire(partp,parent,color1,color2,ssize,osize,leinght,material,minr,maxr,shape,spread,st,ot,onlyraise)
  268. local part = Instance.new("Part",parent) part.Size = Vector3.new(ssize,ssize,ssize) part.Transparency = st part.CanCollide = false part.Anchored = true part.Shape = shape part.Material = material part.BrickColor = BrickColor.new(color1) part.CFrame = partp.CFrame * CFrame.new(partp.Size.x/math.random(-20,20),partp.Size.y/math.random(-20,20),partp.Size.z/math.random(-20,20))
  269. if onlyraise == true then
  270. part.CFrame = CFrame.new(part.CFrame.p,Vector3.new(nil,part.CFrame.y,part.CFrame.z))
  271. else
  272. end
  273. local pcf = part.CFrame
  274. tlerp(part,{CFrame = pcf * CFrame.new(math.random(-spread,spread)/math.random(2,4),math.random(minr,maxr),math.random(-spread,spread)/math.random(2,4)) * CFrame.Angles(rad(math.random(-180,180)),rad(math.random(-180,180)),rad(math.random(-180,180))),Size = Vector3.new(osize,osize,osize),Color = BrickColor.new(color2).Color,Transparency = ot},leinght,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut)
  275. game:GetService("Debris"):AddItem(part,leinght)
  276. end
  277. function removewithfade(part,timebeforefade,randc)
  278. pcall(function()
  279. coroutine.resume(coroutine.create(function()
  280. wait(timebeforefade)
  281. part:BreakJoints()
  282. part.Name = "JustGoingAwayOk?"
  283. for i = 1,25 do
  284. if randc then
  285. part.BrickColor = BrickColor.Random()
  286. end
  287. part.Transparency = part.Transparency +.04
  288. wait()
  289. end
  290. part:Destroy()
  291. end))
  292. end)
  293. end
  294. function fadewithfly(part,color,randc)
  295. pcall(function()
  296. part:ClearAllChildren()
  297. part.CanCollide = false
  298. part.Anchored = false
  299. part.Massless = true
  300. part.Locked = false
  301. part.Archivable = true
  302. part.Material = "Neon"
  303. part.BrickColor = BrickColor.new(color)
  304. local vel = Instance.new("BodyVelocity")
  305. vel.MaxForce = v3(huge,huge,huge)
  306. vel.P = 10000
  307. vel.Velocity = v3(math.random(-3,3),math.random(1,3),math.random(-3,3))
  308. local avel = Instance.new("BodyAngularVelocity")
  309. avel.MaxTorque = v3(huge,huge,huge)
  310. avel.AngularVelocity = v3(math.random(-2,2),math.random(-2,2),math.random(-2,2))
  311. avel.Parent = part
  312. vel.Parent = part
  313. if randc then
  314. removewithfade(part,0,true)
  315. else
  316. removewithfade(part,0,false)
  317. end
  318. end)
  319. end
  320. function throwsb(to,power)
  321. pcall(function()
  322. local sb = Instance.new("Part")
  323. sb.Size = v3(1,1,1)
  324. sb.BrickColor = BrickColor.new("Institutional white")
  325. sb.CFrame = ra.CFrame * CFrame.new(0,-1.5,0)
  326. sb.Material = "Sand"
  327. sb.Parent = workspace
  328. sb.Shape = "Ball"
  329. sb:BreakJoints()
  330. local vel = Instance.new("BodyVelocity")
  331. vel.MaxForce = v3(huge,huge,huge)
  332. vel.Velocity = CFrame.new(sb.Position,to).LookVector * power
  333. remove(vel,.2)
  334. vel.Parent = sb
  335. sb.Touched:Connect(function(hit)
  336. if hit.Parent ~= char and hit.Parent.Parent ~= char then
  337. local shum = hit.Parent:FindFirstChildOfClass("Humanoid") or hit.Parent.Parent:FindFirstChildOfClass("Humanoid")
  338. if shum then
  339. coroutine.resume(coroutine.create(function()
  340. shum.PlatformStand = true
  341. wait(.5)
  342. shum.PlatformStand = false
  343. end))
  344. end
  345. local cf = sb.CFrame
  346. sb:Destroy()
  347. for i = 1,math.random(6,12) do
  348. local force = 5
  349. local debr = Instance.new("Part")
  350. debr.Size = v3(.2,.2,.2)
  351. debr.BrickColor = BrickColor.new("Institutional white")
  352. debr.Material = "Sand"
  353. debr.Parent = workspace
  354. debr.CFrame = cf * CFrame.new(1/math.random(-5,5),1/math.random(-5,5),1/math.random(-5,5))
  355. debr:BreakJoints()
  356. debr.Name = "SnowDedree"
  357. local mesh = Instance.new("SpecialMesh",debr)
  358. mesh.MeshType = "Sphere"
  359. mesh.Scale = v3(math.random(10,30)/10,math.random(10,30)/10,math.random(10,30)/10)
  360. local fors = Instance.new("BodyForce",debr)
  361. fors.Force = v3(math.random(-force,force),math.random(-force,force),math.random(-force,force))
  362. remove(debr,math.random(4,7))
  363. remove(fors,.05)
  364. end
  365. end
  366. end)
  367. end)
  368. end
  369. function introhat()
  370. pcall(function()
  371. using = true
  372. rsw.Part1 = rapr
  373. lsw.Part1 = lapl
  374. local hpart = Instance.new("Part",char) hpart.Size = Vector3.new(.01,.01,.01) hpart.Transparency = 0 hpart.Name = "Santa Hat"
  375. hpart.Locked = true
  376. local hmesh = Instance.new("FileMesh",hpart) hmesh.MeshId = "http://www.roblox.com/asset/?id=1090610" hmesh.TextureId = "http://www.roblox.com/asset/?id=66690053"
  377. local hweld = Instance.new("Weld",h) hweld.Part0 = ra hweld.Part1 = hpart hweld.C0 = CFrame.new(0,-1.2,0) * CFrame.Angles(rad(-120),rad(30),rad(0))
  378. tlerp(rsw,{C0 = CFrame.new(-.3,-.1,-.1) * CFrame.Angles(rad(50),rad(20),rad(-40))},.5,qui,io)
  379. tlerp(lsw,{C0 = CFrame.new(.3,-.1,-.1) * CFrame.Angles(rad(50),rad(-20),rad(40))},.5,qui,io)
  380. tlerp(hweld,{C0 = CFrame.new(0,-1.2,0) * CFrame.Angles(rad(-120),rad(-65),rad(-30))},.5,qui,io)
  381. wait(.65)
  382. tlerp(rsw,{C0 = CFrame.new(-.3,.65,-.2) * CFrame.Angles(rad(160),rad(20),rad(-30))},.7,qui,io)
  383. tlerp(lsw,{C0 = CFrame.new(.3,.65,-.2) * CFrame.Angles(rad(160),rad(-20),rad(30))},.7,qui,io)
  384. tlerp(hweld,{C0 = CFrame.new(-.3,-1.2,-.2) * CFrame.Angles(rad(-180),rad(-65),rad(-100)) * CFrame.Angles(rad(0),rad(0),rad(60))},.7,qui,io)
  385. wait(.65)
  386. tlerp(rsw,{C0 = CFrame.new(-.3,.15,0) * CFrame.Angles(rad(179),rad(20),rad(-30))},.7,qui,io)
  387. tlerp(lsw,{C0 = CFrame.new(.3,.15,0) * CFrame.Angles(rad(179),rad(-20),rad(30))},.7,qui,io)
  388. hweld.C0 = CFrame.new(-.3,-1,-.2) * CFrame.Angles(rad(-180),rad(0),rad(0)) * CFrame.Angles(rad(0),rad(0),rad(-30)) * CFrame.Angles(rad(0),rad(-30),rad(0))
  389. wait(.6)
  390. hweld.Part0 = h
  391. hweld.C0 = CFrame.new(0,.5,0) * CFrame.Angles(rad(0),rad(-30),rad(0))
  392. tlerp(rsw,{C0 = CFrame.new(0,0,0)},1,qui,io)
  393. tlerp(lsw,{C0 = CFrame.new(0,0,0)},1,qui,io)
  394. local music = Instance.new("Sound",t) music.Name = "Song" music.SoundId = "rbxassetid://1845187266" music.Volume = 0 music.Looped = true music:Play()
  395. coroutine.resume(coroutine.create(function()
  396. for i = 1,5 do
  397. music.Volume = music.Volume +.125
  398. wait(.2)
  399. end
  400. end))
  401. spart = Instance.new("Part",char) spart.Size = Vector3.new(20,1,20) spart.CanCollide = false spart.Anchored = true spart.Massless = true spart.Transparency = 1 spart.CFrame = h.CFrame * CFrame.new(0,15,0) spart.Locked = true
  402. local emitter = Instance.new("ParticleEmitter",spart) emitter.Texture = "http://www.roblox.com/asset/?id=137831468" emitter.Size = NumberSequence.new(.2,.01) emitter.Rate = 40 emitter.Color = ColorSequence.new(Color3.new(1,1,1),Color3.new(1,1,1)) emitter.EmissionDirection = "Top" emitter.Lifetime = NumberRange.new(3) emitter.Acceleration = Vector3.new(0,-40,0) emitter.Speed = NumberRange.new(-10,10) emitter.SpreadAngle = Vector2.new(-30,30)
  403. wait(1)
  404. nec:Destroy()
  405. rs:Destroy()
  406. ls:Destroy()
  407. rh:Destroy()
  408. lh:Destroy()
  409. nec = Instance.new("Motor6D",t) nec.Part0 = p0 nec.Part1 = p1 nec.C0 = cf01
  410. rs = Instance.new("Motor6D",t) rs.Part0 = rsp0 rs.Part1 = rsp1 rs.C0 = cf03
  411. ls = Instance.new("Motor6D",t) ls.Part0 = lsp0 ls.Part1 = lsp1 ls.C0 = cf04
  412. rh = Instance.new("Motor6D",t) rh.Part0 = rhp0 rh.Part1 = rhp1 rh.C0 = cf05
  413. lh = Instance.new("Motor6D",t) lh.Part0 = lhp0 lh.Part1 = lhp1 lh.C0 = cf06
  414. rsw.Part1 = nil
  415. lsw.Part1 = nil
  416. using = false
  417. end)
  418. end
  419. function hug(who)
  420. pcall(function()
  421. if not hugging then
  422. local removerut = false
  423. hugging = true
  424. using = true
  425. local tors = who:FindFirstChild("Torso") or who:FindFirstChild("UpperTorso")
  426. local hu = who:FindFirstChildOfClass("Humanoid")
  427. hu.PlatformStand = true
  428. local weld = Instance.new("Weld",t) weld.Part0 = t weld.Part1 = tors weld.C0 = CFrame.new(0,0,-.9) * CFrame.Angles(rad(0),rad(180),rad(0))
  429. local deb = Instance.new("Glue",who) deb.Name = "Hugging"
  430. tlerp(rsw,{C0 = CFrame.new(-.3,-.2,-.45) * CFrame.Angles(rad(110),rad(0),rad(0)) * CFrame.Angles(rad(0),rad(0),rad(-60))},.4,qui,io)
  431. tlerp(lsw,{C0 = CFrame.new(.2,-.2,-.45) * CFrame.Angles(rad(105),rad(0),rad(0)) * CFrame.Angles(rad(0),rad(0),rad(65))},.4,qui,io)
  432. tlerp(nec,{C0 = CFrame.new(-.15,1,0) * CFrame.Angles(rad(90),rad(180),rad(0)) * CFrame.Angles(rad(0),rad(15),rad(25))},.4,qui,io)
  433. rsw.Part1 = rapr
  434. lsw.Part1 = lapl
  435. wait(hugtime)
  436. tlerp(rsw,{C0 = CFrame.new(0,0,0)},.7,qui,io)
  437. tlerp(lsw,{C0 = CFrame.new(0,0,0)},.7,qui,io)
  438. tlerp(nec,{C0 = CFrame.new(0,1,0) * CFrame.Angles(rad(90),rad(180),rad(0))},.7,qui,io)
  439. wait(.4)
  440. hu.PlatformStand = false
  441. weld:Destroy()
  442. wait(.4)
  443. rsw.Part1 = nil
  444. lsw.Part1 = nil
  445. deb:Destroy()
  446. hugging = false
  447. using = false
  448. end
  449. end)
  450. end
  451. function detect()
  452. pcall(function()
  453. coroutine.resume(coroutine.create(function()
  454. local canhug = true
  455. local fakedetect = Instance.new("Part",char) fakedetect.Size = Vector3.new(3.5,5,3.5) fakedetect.CanCollide = false fakedetect.Massless = true fakedetect.Transparency = 1 fakedetect.CFrame = t.CFrame
  456. local fdweld = Instance.new("Weld",fakedetect) fdweld.Part0 = t fdweld.Part1 = fakedetect fdweld.C0 = CFrame.new(0,0,-1)
  457. local region
  458. for i = 1,5 do
  459. if canhug then
  460. region = Region3.new(fakedetect.Position - fakedetect.Size/2,fakedetect.Position + fakedetect.Size/2)
  461. local hit = workspace:FindPartsInRegion3WithIgnoreList(region,{char},200)
  462. local characters = {}
  463. for i,v in pairs(hit) do
  464. if v.Parent:FindFirstChildOfClass("Humanoid") ~= nil then
  465. characters[v.Parent.Name] = v.Parent
  466. end
  467. end
  468. for i,v in pairs(characters) do
  469. spawn(function()
  470. fakedetect:Destroy()
  471. hug(v)
  472. canhug = false
  473. end)
  474. end
  475. end
  476. wait(.1)
  477. end
  478. if canhug then
  479. if fakedetect ~= nil then
  480. fakedetect:Destroy()
  481. end
  482. end
  483. end))
  484. end)
  485. end
  486. function placegift()
  487. pcall(function()
  488. using = true
  489. hum.WalkSpeed = 0 hum.JumpPower = 0
  490. rsw.Part1 = rapr
  491. lsw.Part1 = lapl
  492. local giftp = Instance.new("Part",char) giftp.Size = Vector3.new(1.5,1.5,1.5) giftp.Massless = true giftp.CanCollide = false giftp.Name = "Gift"
  493. local gmesh = Instance.new("FileMesh",giftp) gmesh.MeshId = "rbxassetid://1237207" gmesh.TextureId = gifts[math.random(1,#gifts)] gmesh.Scale = Vector3.new(1.5,1.5,1.5)
  494. local gweld = Instance.new("Weld",giftp) gweld.Part0 = ra gweld.Part1 = giftp gweld.C0 = CFrame.new(-.55,-1.4,0) * CFrame.Angles(rad(-60),rad(-10),rad(10))
  495. tlerp(rsw,{C0 = CFrame.new(-.3,-.3,-.3) * CFrame.Angles(rad(80),rad(0),rad(-20))},.7,qui,io)
  496. tlerp(lsw,{C0 = CFrame.new(.3,-.3,-.3) * CFrame.Angles(rad(80),rad(0),rad(20))},.7,qui,io)
  497. tlerp(nec,{C0 = CFrame.new(0,1,0) * CFrame.Angles(rad(70),rad(180),rad(0))},.7,qui,io)
  498. tlerp(rh,{C0 = CFrame.new(1,0,-.7) * CFrame.Angles(rad(0),rad(90),rad(0)) * CFrame.Angles(rad(0),rad(0),rad(20))},.7,qui,io)
  499. tlerp(lh,{C0 = CFrame.new(-1,-1.3,-1) * CFrame.Angles(rad(0),rad(-90),rad(0)) * CFrame.Angles(rad(0),rad(0),rad(70))},.7,qui,io)
  500. tlerp(rutj,{C0 = CFrame.new(0,-1,0) * CFrame.Angles(rad(70),rad(180),rad(0))},.7,qui,io)
  501. wait(.6)
  502. local ray = Ray.new(giftp.Position - Vector3.new(0,giftp.Size.y/2,0),-giftp.CFrame.UpVector.unit * 20)
  503. local hit,pos,idk = workspace:FindPartOnRayWithIgnoreList(ray,{char,giftp},false,true)
  504. if hit ~= nil then
  505. local oy = giftp.Orientation.y
  506. local oz = giftp.Orientation.z
  507. giftp:BreakJoints()
  508. giftp.Anchored = true
  509. giftp.CanCollide = true
  510. giftp.Parent = workspace
  511. giftp.CFrame = CFrame.new(pos,pos + idk) * CFrame.Angles(rad(-90),rad(oy),rad(oz)) * CFrame.new(0,.75,0)
  512. local cdet = Instance.new("ClickDetector",giftp) cdet.MaxActivationDistance = 10
  513. spawn(function()
  514. removewithfade(giftp,30)
  515. cdet.MouseClick:Connect(function(plr)
  516. if script.ClassName == "Script" then
  517. local ids = {113328094,16924676,26419811,164207842,212641536}
  518. local requireditem = game:GetService("InsertService"):LoadAsset(ids[math.random(1,#ids)])
  519. local item = requireditem:FindFirstChildOfClass("Tool")
  520. item.Parent = plr.Backpack
  521. removewithfade(giftp,0)
  522. cdet:Destroy()
  523. else
  524. print("oof")
  525. removewithfade(giftp,0)
  526. cdet:Destroy()
  527. end
  528. end)
  529. end)
  530. else
  531. giftp:Destroy()
  532. end
  533. tlerp(rsw,{C0 = CFrame.new(0,0,0)},.7,qui,io)
  534. tlerp(lsw,{C0 = CFrame.new(0,0,0)},.7,qui,io)
  535. tlerp(nec,{C0 = CFrame.new(0,1,0) * CFrame.Angles(rad(90),rad(180),rad(0))},.7,qui,io)
  536. tlerp(rh,{C0 = CFrame.new(1,-1,0) * CFrame.Angles(rad(0),rad(90),rad(0))},.7,qui,io)
  537. tlerp(lh,{C0 = CFrame.new(-1,-1,0) * CFrame.Angles(rad(0),rad(-90),rad(0))},.7,qui,io)
  538. tlerp(rutj,{C0 = CFrame.new(0,0,0) * CFrame.Angles(rad(90),rad(180),rad(0))},.7,qui,io)
  539. wait(.6)
  540. hum.WalkSpeed = 16 hum.JumpPower = 50
  541. rsw.Part1 = nil
  542. lsw.Part1 = nil
  543. using = false
  544. end)
  545. end
  546. function huggies()
  547. pcall(function()
  548. using = true
  549. rsw.Part1 = rapr
  550. lsw.Part1 = lapl
  551. tlerp(rsw,{C0 = CFrame.new(0,0,-.5) * CFrame.Angles(rad(90),rad(0),rad(50))},.55,qui,io)
  552. tlerp(lsw,{C0 = CFrame.new(0,0,-.5) * CFrame.Angles(rad(90),rad(0),rad(-50))},.65,qui,io)
  553. wait(.35)
  554. detect()
  555. tlerp(rsw,{C0 = CFrame.new(-.3,-.2,-.45) * CFrame.Angles(rad(110),rad(0),rad(0)) * CFrame.Angles(rad(0),rad(0),rad(-60))},.4,qui,io)
  556. tlerp(lsw,{C0 = CFrame.new(.2,-.2,-.45) * CFrame.Angles(rad(105),rad(0),rad(0)) * CFrame.Angles(rad(0),rad(0),rad(65))},.4,qui,io)
  557. wait(.5)
  558. if not hugging then
  559. tlerp(rsw,{C0 = CFrame.new(0,0,0)},.4,qui,io)
  560. tlerp(lsw,{C0 = CFrame.new(0,0,0)},.4,qui,io)
  561. wait(.5)
  562. rsw.Part1 = nil
  563. lsw.Part1 = nil
  564. using = false
  565. end
  566. end)
  567. end
  568. function grabsb()
  569. pcall(function()
  570. using = true
  571. hum.WalkSpeed = 0
  572. hum.JumpPower = 0
  573. rsw.Part1 = rapr
  574. tlerp(rsw,{C0 = CFrame.new(0,-.4,0) * CFrame.Angles(rad(30),rad(0),rad(20))},.4,qui,io)
  575. tlerp(nec,{C0 = CFrame.new(0,1,0) * CFrame.Angles(rad(70),rad(180),rad(0))},.4,qui,io)
  576. tlerp(rh,{C0 = CFrame.new(1,.6,-.7) * CFrame.Angles(rad(0),rad(90),rad(0)) * CFrame.Angles(rad(-25),rad(0),rad(20))},.4,qui,io)
  577. tlerp(lh,{C0 = CFrame.new(-1,.3,-.7) * CFrame.Angles(rad(0),rad(-90),rad(0)) * CFrame.Angles(rad(15),rad(0),rad(-20))},.4,qui,io)
  578. tlerp(rutj,{C0 = CFrame.new(0,-1.2,0) * CFrame.Angles(rad(60),rad(180),rad(30))},.4,qui,io)
  579. wait(.3)
  580. local hit,pos,rot = rayc(ra.Position -v3(0,1,0),-ra.CFrame.UpVector,{char},.5)
  581. if hit ~= nil and pos then
  582. local cff = CFrame.new(pos,pos+rot) * CFrame.Angles(0,rad(90),0)
  583. local snow = Instance.new("Part",char) snow.Shape = "Cylinder" snow.Transparency = 1 snow.Size = v3(.1,.1,.1) snow.Material = "Sand" snow.BrickColor = BrickColor.new("Institutional white") snow.CanCollide = false snow.Anchored = true
  584. tlerp(snow,{Size =v3(.1,2.5,2.5),Transparency = 0},.2,qui,io)
  585. snow.CFrame = cff
  586. removewithfade(snow,1)
  587. else
  588. tlerp(rsw,{C0 = CFrame.new(0,0,0)},.5,qui,io)
  589. tlerp(nec,{C0 = CFrame.new(0,1,0) * CFrame.Angles(rad(90),rad(180),rad(0))},.5,qui,io)
  590. tlerp(rh,{C0 = CFrame.new(1,-1,0) * CFrame.Angles(rad(0),rad(90),rad(0))},.5,qui,io)
  591. tlerp(lh,{C0 = CFrame.new(-1,-1,0) * CFrame.Angles(rad(0),rad(-90),rad(0))},.5,qui,io)
  592. tlerp(rutj,{C0 = CFrame.new(0,0,0) * CFrame.Angles(rad(90),rad(180),rad(0))},.5,qui,io)
  593. wait(.4)
  594. aiming = false
  595. hum.WalkSpeed = 16
  596. hum.JumpPower = 50
  597. rut.Anchored = false
  598. rsw.Part1 = nil
  599. using = false
  600. return warn("Can`t grab a snow ball.")
  601. end
  602. wait(.15)
  603. local fsb = Instance.new("Part",char) fsb.Name = "MustDestroy" fsb.Shape = "Ball" fsb.Size = v3(1,1,1) fsb.CanCollide = false fsb.BrickColor = BrickColor.new("Institutional white") fsb.Material = "Sand"
  604. local fweld = Instance.new("Weld",fsb) fweld.Part0 = ra fweld.Part1 = fsb fweld.C0 = CFrame.new(0,-1.2,0)
  605. tlerp(rsw,{C0 = CFrame.new(0,0,0) * CFrame.Angles(rad(200),rad(10),rad(-10))},.4,qui,io)
  606. tlerp(nec,{C0 = CFrame.new(0,1,0) * CFrame.Angles(rad(90),rad(180),rad(0))},.4,qui,io)
  607. tlerp(rh,{C0 = CFrame.new(1,-1,0) * CFrame.Angles(rad(0),rad(90),rad(-10))},.4,qui,io)
  608. tlerp(lh,{C0 = CFrame.new(-1,-1,0) * CFrame.Angles(rad(0),rad(-90),rad(10))},.4,qui,io)
  609. tlerp(rutj,{C0 = CFrame.new(0,0,0) * CFrame.Angles(rad(100),rad(180),rad(-10))},.4,qui,io)
  610. wait(.3)
  611. aiming = true
  612. repeat
  613. wait(.2)
  614. until aiming == false
  615. tlerp(rsw,{C0 = CFrame.new(0,0,0)},.5,qui,io)
  616. tlerp(nec,{C0 = CFrame.new(0,1,0) * CFrame.Angles(rad(90),rad(180),rad(0))},.5,qui,io)
  617. tlerp(rh,{C0 = CFrame.new(1,-1,0) * CFrame.Angles(rad(0),rad(90),rad(0))},.5,qui,io)
  618. tlerp(lh,{C0 = CFrame.new(-1,-1,0) * CFrame.Angles(rad(0),rad(-90),rad(0))},.5,qui,io)
  619. tlerp(rutj,{C0 = CFrame.new(0,0,0) * CFrame.Angles(rad(90),rad(180),rad(0))},.5,qui,io)
  620. wait(.4)
  621. rsw.Part1 = nil
  622. using = false
  623. end)
  624. end
  625. function land()
  626. if phit then
  627. readytoland = false
  628. landed = true
  629. hum.WalkSpeed = 1.5
  630. hum.JumpPower = 0
  631. lsound:Play()
  632. for i = 0,1,.1 do
  633. rutj.C0 = rutj.C0:Lerp(CFrame.new(0,-.5,0) * CFrame.Angles(rad(-100),rad(0),rad(180)),i)
  634. rh.C0 = rh.C0:Lerp(CFrame.new(1,-.5,-.3) * CFrame.Angles(rad(11),rad(90),rad(0)),i)
  635. lh.C0 = lh.C0:Lerp(CFrame.new(-1,-.5,-.25) * CFrame.Angles(rad(9),rad(-90),rad(0)),i)
  636. rs.C0 = rs.C0:Lerp(CFrame.new(1,.35,0) * CFrame.Angles(rad(0),rad(90),rad(0)) * CFrame.Angles(rad(-15),rad(0),rad(10)),i)
  637. ls.C0 = ls.C0:Lerp(CFrame.new(-1,.35,0) * CFrame.Angles(rad(0),rad(-90),rad(0)) * CFrame.Angles(rad(-15),rad(0),rad(-10)),i)
  638. nec.C0 = nec.C0:Lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-100),rad(0),rad(180)),i)
  639. swait()
  640. end
  641. for i = 1,math.random(6,9) do
  642. fire(effpart,workspace,tostring(phit.BrickColor),tostring(phit.BrickColor),math.random(7,13)/10,math.random(3,6)/10,math.random(4,6)/10,phit.Material,0,0,"Block",5,0,1,true)
  643. end
  644. wait(.3)
  645. landed = false
  646. hum.WalkSpeed = 16
  647. hum.JumpPower = 50
  648. end
  649. end
  650. function tsbanim()
  651. pcall(function()
  652. tlerp(nec,{C0 = CFrame.new(0,1,0) * CFrame.Angles(rad(90),rad(180),rad(0))},.2,qui,io)
  653. tlerp(rh,{C0 = CFrame.new(1,-1,0) * CFrame.Angles(rad(0),rad(90),rad(-10))},.2,qui,io)
  654. tlerp(lh,{C0 = CFrame.new(-1,-1,0) * CFrame.Angles(rad(0),rad(-90),rad(10))},.2,qui,io)
  655. tlerp(rutj,{C0 = CFrame.new(0,0,0) * CFrame.Angles(rad(100),rad(180),rad(10))},.2,qui,io)
  656. coroutine.resume(coroutine.create(function()
  657. for i = 0,1,.05 do
  658. rsw.C0 = rsw.C0:Lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(170),rad(-10),rad(10)) * CFrame.Angles(-cos(i/aa/1.5)*rad(70),0,0),i)
  659. swait()
  660. end
  661. end))
  662. wait(.1)
  663. char:WaitForChild("MustDestroy",.5):Destroy()
  664. throwsb(mouse.Hit.p,70)
  665. aiming = false
  666. hum.WalkSpeed = 16
  667. hum.JumpPower = 50
  668. rut.Anchored = false
  669. end)
  670. end
  671. function sit()
  672. pcall(function()
  673. using = true
  674. hum.WalkSpeed = 0
  675. hum.JumpPower = 0
  676. tlerp(nec,{C0 = CFrame.new(0,1,0) * CFrame.Angles(rad(90),rad(180),rad(0))},.5,qui,io)
  677. tlerp(rutj,{C0 = CFrame.new(0,-1.1,0) * CFrame.Angles(rad(100),rad(180),rad(-20))},.5,qui,io)
  678. tlerp(rs,{C0 = CFrame.new(1,.5,0) * CFrame.Angles(rad(-10),rad(90),rad(20))},.5,qui,io)
  679. tlerp(ls,{C0 = CFrame.new(-1,.5,0) * CFrame.Angles(rad(-10),rad(-90),rad(20))},.5,qui,io)
  680. tlerp(rh,{C0 = CFrame.new(1,.1,-.4) * CFrame.Angles(rad(-20),rad(90),rad(0))},.5,qui,io)
  681. tlerp(lh,{C0 = CFrame.new(-1,-1,0) * CFrame.Angles(rad(70),rad(-90),rad(0))},.5,qui,io)
  682. wait(.35)
  683. if not furmode then
  684. tlerp(nec,{C0 = CFrame.new(0,1,0) * CFrame.Angles(rad(70),rad(180),rad(0))},.5,qui,io)
  685. tlerp(rutj,{C0 = CFrame.new(0,-1.7,0) * CFrame.Angles(rad(120),rad(180),rad(0))},.5,qui,io)
  686. tlerp(rs,{C0 = CFrame.new(1,.15,.25) * CFrame.Angles(rad(-35),rad(85),rad(0)) * CFrame.Angles(rad(-5),rad(0),rad(0))},.5,qui,io)
  687. tlerp(ls,{C0 = CFrame.new(-1,.15,.25) * CFrame.Angles(rad(-35),rad(-65),rad(0)) * CFrame.Angles(rad(-5),rad(0),rad(0))},.5,qui,io)
  688. tlerp(rh,{C0 = CFrame.new(1,-1,0) * CFrame.Angles(rad(60),rad(90),rad(0)) * CFrame.Angles(rad(-5),rad(0),rad(0))},.5,qui,io)
  689. tlerp(lh,{C0 = CFrame.new(-1,-1,0) * CFrame.Angles(rad(60),rad(-90),rad(0)) * CFrame.Angles(rad(-5),rad(0),rad(0))},.5,qui,io)
  690. else
  691. tlerp(nec,{C0 = CFrame.new(0,1,0) * CFrame.Angles(rad(-75),rad(0),rad(180))},.5,qui,io)
  692. tlerp(rutj,{C0 = CFrame.new(0,-1.6,0) * CFrame.Angles(rad(-105),rad(0),rad(180))},.5,qui,io)
  693. tlerp(rs,{C0 = CFrame.new(.5,.2,-.3) * CFrame.Angles(rad(-10),rad(95),rad(30)) * CFrame.Angles(rad(25),rad(20),rad(0))},.5,qui,io)
  694. tlerp(ls,{C0 = CFrame.new(-.5,.2,-.3) * CFrame.Angles(rad(-10),rad(-95),rad(-30)) * CFrame.Angles(rad(25),rad(-20),rad(0))},.5,qui,io)
  695. tlerp(rh,{C0 = CFrame.new(1,-1,0) * CFrame.Angles(rad(15),rad(90),rad(0)) * CFrame.Angles(rad(0),rad(-20),rad(90))},.5,qui,io)
  696. tlerp(lh,{C0 = CFrame.new(-1,-1,0) * CFrame.Angles(rad(15),rad(-90),rad(0)) * CFrame.Angles(rad(0),rad(20),rad(-90))},.5,qui,io)
  697. end
  698. wait(.35)
  699. sitting = true
  700. end)
  701. end
  702. function getup()
  703. pcall(function()
  704. using = true
  705. sitting = true
  706. hum.WalkSpeed = 0
  707. hum.JumpPower = 0
  708. tlerp(nec,{C0 = CFrame.new(0,1,0) * CFrame.Angles(rad(90),rad(180),rad(0))},.5,qui,io)
  709. tlerp(rutj,{C0 = CFrame.new(0,-1.1,0) * CFrame.Angles(rad(100),rad(180),rad(-20))},.5,qui,io)
  710. tlerp(rs,{C0 = CFrame.new(1,.5,0) * CFrame.Angles(rad(-10),rad(90),rad(20))},.5,qui,io)
  711. tlerp(ls,{C0 = CFrame.new(-1,.5,0) * CFrame.Angles(rad(-10),rad(-90),rad(20))},.5,qui,io)
  712. tlerp(rh,{C0 = CFrame.new(1,.1,-.4) * CFrame.Angles(rad(-20),rad(90),rad(0))},.5,qui,io)
  713. tlerp(lh,{C0 = CFrame.new(-1,-1,0) * CFrame.Angles(rad(70),rad(-90),rad(0))},.5,qui,io)
  714. wait(.35)
  715. tlerp(nec,{C0 = CFrame.new(0,1,0) * CFrame.Angles(rad(90),rad(180),rad(0))},.5,qui,io)
  716. tlerp(rutj,{C0 = CFrame.new(0,0,0) * CFrame.Angles(rad(90),rad(180),rad(0))},.5,qui,io)
  717. tlerp(rs,{C0 = CFrame.new(1,.5,0) * CFrame.Angles(rad(0),rad(90),rad(0))},.5,qui,io)
  718. tlerp(ls,{C0 = CFrame.new(-1,.5,0) * CFrame.Angles(rad(0),rad(-90),rad(0))},.5,qui,io)
  719. tlerp(rh,{C0 = CFrame.new(1,-1,0) * CFrame.Angles(rad(0),rad(90),rad(0))},.5,qui,io)
  720. tlerp(lh,{C0 = CFrame.new(-1,-1,0) * CFrame.Angles(rad(0),rad(-90),rad(0))},.5,qui,io)
  721. wait(.35)
  722. using = false
  723. sitting = false
  724. hum.WalkSpeed = 16
  725. hum.JumpPower = 50
  726. end)
  727. end
  728. function tp()
  729. pcall(function()
  730. using = true
  731. hum.WalkSpeed = 0
  732. hum.JumpPower = 0
  733. rut.Anchored = true
  734. local hit,pos,rot = rayc(rut.Position -v3(0,1,0),-rut.CFrame.UpVector,{char},30)
  735. local hit1,pos1,rot1 = rayc(mouse.Hit.p+v3(0,.7,0),-rut.CFrame.UpVector,{char},10)
  736. if hit ~= nil and pos and hit1 then
  737. local cff = CFrame.new(pos,pos+rot) * CFrame.Angles(0,rad(90),0)
  738. local snow = Instance.new("Part",char) snow.Shape = "Cylinder" snow.Transparency = 1 snow.Size = v3(.1,.1,.1) snow.Material = "Sand" snow.BrickColor = BrickColor.new("Institutional white") snow.CanCollide = false snow.Anchored = true
  739. tlerp(snow,{Size =v3(.1,7.5,7.5),Transparency = 0},.2,qui,io)
  740. snow.CFrame = cff
  741. wait(.1)
  742. tlerp(rut,{CFrame = CFrame.new(pos) * CFrame.new(0,-5,0)},.3,qui,io)
  743. wait(.2)
  744. removewithfade(snow,1)
  745. else
  746. tlerp(rsw,{C0 = CFrame.new(0,0,0)},.5,qui,io)
  747. tlerp(nec,{C0 = CFrame.new(0,1,0) * CFrame.Angles(rad(90),rad(180),rad(0))},.5,qui,io)
  748. tlerp(rh,{C0 = CFrame.new(1,-1,0) * CFrame.Angles(rad(0),rad(90),rad(0))},.5,qui,io)
  749. tlerp(lh,{C0 = CFrame.new(-1,-1,0) * CFrame.Angles(rad(0),rad(-90),rad(0))},.5,qui,io)
  750. tlerp(rutj,{C0 = CFrame.new(0,0,0) * CFrame.Angles(rad(90),rad(180),rad(0))},.5,qui,io)
  751. wait(.4)
  752. aiming = false
  753. hum.WalkSpeed = 16
  754. hum.JumpPower = 50
  755. rut.Anchored = false
  756. rsw.Part1 = nil
  757. using = false
  758. return warn("Can`t teleport.")
  759. end
  760. local sn
  761. if hit1 ~= nil and pos1 then
  762. local cff = CFrame.new(pos1,pos1+rot1) * CFrame.Angles(0,rad(90),0)
  763. local snow = Instance.new("Part",char) snow.Shape = "Cylinder" snow.Transparency = 1 snow.Size = v3(.1,.1,.1) snow.Material = "Sand" snow.BrickColor = BrickColor.new("Institutional white") snow.CanCollide = false snow.Anchored = true
  764. tlerp(snow,{Size =v3(.1,7.5,7.5),Transparency = 0},.2,qui,io)
  765. snow.CFrame = cff
  766. sn = snow
  767. removewithfade(snow,1)
  768. else
  769. tlerp(rsw,{C0 = CFrame.new(0,0,0)},.5,qui,io)
  770. tlerp(nec,{C0 = CFrame.new(0,1,0) * CFrame.Angles(rad(90),rad(180),rad(0))},.5,qui,io)
  771. tlerp(rh,{C0 = CFrame.new(1,-1,0) * CFrame.Angles(rad(0),rad(90),rad(0))},.5,qui,io)
  772. tlerp(lh,{C0 = CFrame.new(-1,-1,0) * CFrame.Angles(rad(0),rad(-90),rad(0))},.5,qui,io)
  773. tlerp(rutj,{C0 = CFrame.new(0,0,0) * CFrame.Angles(rad(90),rad(180),rad(0))},.5,qui,io)
  774. wait(.4)
  775. aiming = false
  776. hum.WalkSpeed = 16
  777. hum.JumpPower = 50
  778. rut.Anchored = false
  779. rsw.Part1 = nil
  780. using = false
  781. return warn("Can`t teleport.")
  782. end
  783. if sn.Orientation.z ~= 90 then
  784. rut.CFrame = sn.CFrame * CFrame.new(-3,0,0)
  785. rut.CFrame = CFrame.new(rut.Position,sn.Position)
  786. tlerp(rut,{CFrame = rut.CFrame * CFrame.new(0,0,-5)},.3,qui,io)
  787. else
  788. rut.CFrame = sn.CFrame * CFrame.new(-3,0,0)
  789. rut.CFrame = CFrame.new(rut.Position,v3(nil,sn.CFrame.y,sn.CFrame.z))
  790. tlerp(rut,{CFrame = rut.CFrame * CFrame.new(0,5,0)},.3,qui,io)
  791. end
  792. wait(.2)
  793. rut.CFrame = CFrame.new(rut.Position,Vector3.new(nil,rut.CFrame.y,-rut.CFrame.z))
  794. rut.Anchored = false
  795. hum.WalkSpeed = 16
  796. hum.JumpPower = 50
  797. using = false
  798. end)
  799. end
  800. function candybag()
  801. pcall(function()
  802. using = true
  803. rsw.Part1 = rapr
  804. lsw.Part1 = lapl
  805. local bag = Instance.new("Part",char) bag.Locked = true bag.Size = v3(.1,.1,.1) bag.CanCollide = false bag:BreakJoints()
  806. local bmesh = Instance.new("FileMesh",bag) bmesh.MeshId = "rbxassetid://25921854" bmesh.Scale = v3(3.5,3.5,3.5) bmesh.TextureId = "rbxassetid://36938238" bmesh.Offset = v3(0,-.6,0)
  807. local weld = Instance.new("Weld",bag) weld.Part0 = ra weld.Part1 = bag weld.C0 = CFrame.new(0,-1,0)
  808. tlerp(rsw,{C0 = CFrame.new(0,0,0)},.5,qui,io)
  809. tlerp(lsw,{C0 = CFrame.new(0,0,0)},.5,qui,io)
  810. tlerp(nec,{C0 = CFrame.new(0,1,0) * CFrame.Angles(rad(90),rad(180),rad(0))},.5,qui,io)
  811. tlerp(rh,{C0 = CFrame.new(1,-1,0) * CFrame.Angles(rad(0),rad(90),rad(0))},.5,qui,io)
  812. tlerp(lh,{C0 = CFrame.new(-1,-1,0) * CFrame.Angles(rad(0),rad(-90),rad(0))},.5,qui,io)
  813. tlerp(rutj,{C0 = CFrame.new(0,0,0) * CFrame.Angles(rad(90),rad(180),rad(0))},.5,qui,io)
  814. wait(.4)
  815. tlerp(rsw,{C0 = CFrame.new(0,0,0)},.5,qui,io)
  816. tlerp(lsw,{C0 = CFrame.new(0,0,0)},.5,qui,io)
  817. tlerp(nec,{C0 = CFrame.new(0,1,0) * CFrame.Angles(rad(90),rad(180),rad(0))},.5,qui,io)
  818. tlerp(rh,{C0 = CFrame.new(1,-1,0) * CFrame.Angles(rad(0),rad(90),rad(0))},.5,qui,io)
  819. tlerp(lh,{C0 = CFrame.new(-1,-1,0) * CFrame.Angles(rad(0),rad(-90),rad(0))},.5,qui,io)
  820. tlerp(rutj,{C0 = CFrame.new(0,0,0) * CFrame.Angles(rad(90),rad(180),rad(0))},.5,qui,io)
  821. wait(.4)
  822. rsw.Part1 = nil
  823. lsw.Part1 = nil
  824. using = false
  825. end)
  826. end
  827. function saddeath(who)
  828. for i,v in pairs(who:GetDescendants()) do
  829. coroutine.resume(coroutine.create(function()
  830. if v:IsA("Shirt") or v:IsA("Pants") or v:IsA("ForceField") or v:IsA("CharacterMesh") then
  831. v:Destroy()
  832. end
  833. end))
  834. if v:IsA("Part") or v:IsA("MeshPart") then
  835. fadewithfly(v,"White",false)
  836. end
  837. end
  838. end
  839.  
  840. mouse.KeyDown:Connect(function(key)
  841. pcall(function()
  842. if key == "e" and not using then
  843. huggies()
  844. end
  845. if key == "f" and not using then
  846. placegift()
  847. end
  848. if key == "q" and not using then
  849. grabsb()
  850. end
  851. if key == "z" and not using and not sitting then
  852. sit()
  853. elseif key == "z" and using and sitting then
  854. getup()
  855. end
  856. if key == "c" and not using then
  857. tp()
  858. end
  859. if key == "r"and not using then
  860. --candybag()
  861. end
  862. end)
  863. end)
  864. mouse.Button1Down:Connect(function()
  865. if aiming then
  866. tsbanim()
  867. end
  868. end)
  869. hum.Died:Connect(function()
  870. saddeath(char)
  871. end)
  872.  
  873. local anims = coroutine.wrap(function()
  874. while hum.Health > .001 do
  875. if aiming then
  876. rut.Anchored = true
  877. rut.CFrame = CFrame.new(rut.Position,v3(mouse.Hit.x,rut.CFrame.y,mouse.Hit.z))
  878. end
  879. if hum.WalkSpeed >32 then
  880. hum.WalkSpeed = 32
  881. end
  882. if not lsound.Parent then
  883. lsound = Instance.new("Sound",effpart) lsound.Volume = lsvol lsound.SoundId = "rbxassetid://1161221108"
  884. end
  885. local hit,pos,rot = rayc(rut.Position -v3(0,1,0),-rut.CFrame.UpVector,{char},2.7)
  886. local grhit,grpos,grrot = rayc(grabpart.Position,-grabpart.CFrame.UpVector,{char},1)
  887. phit = hit
  888. if not using then
  889. if grhit and grhit.Anchored == true then
  890. cangrabthecorner = true
  891. else
  892. cangrabthecorner = false
  893. end
  894. end
  895. if cangrabthecorner and not grabbedc then
  896. local shit,spos,srot = rayc(rut.Position+Vector3.new(0,2.5,0),rut.CFrame.LookVector,{char},1.5)
  897. if shit then
  898. grabbedc = true
  899. local cf = CFrame.new(spos,spos+srot) * CFrame.Angles(rad(0),rad(180),0) * CFrame.new(0,-2,.7)
  900. using = true
  901. cangrabthecorner = false
  902. rut.Anchored = true
  903. local oldws = hum.WalkSpeed
  904. hum.WalkSpeed = 0
  905. hum.JumpPower = 0
  906. rut.CFrame = cf
  907. local curcf = rut.CFrame
  908. for i = 0,1,.1 do
  909. rutj.C0 = rutj.C0:Lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),animspeed*50)
  910. rh.C0 = rh.C0:Lerp(CFrame.new(1,-1,0) * CFrame.Angles(rad(0),rad(90),rad(0)),animspeed*50)
  911. lh.C0 = lh.C0:Lerp(CFrame.new(-1,-1,0) * CFrame.Angles(rad(0),rad(-90),rad(0)),animspeed*50)
  912. rs.C0 = rs.C0:Lerp(CFrame.new(.85,.8,-.2) * CFrame.Angles(rad(160),rad(90),rad(0)),animspeed*50)
  913. ls.C0 = ls.C0:Lerp(CFrame.new(-.85,.8,-.2) * CFrame.Angles(rad(160),rad(-90),rad(0)),animspeed*50)
  914. nec.C0 = nec.C0:Lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-30),rad(0),rad(180)),animspeed*50)
  915. swait()
  916. end
  917. for i = 0,.65,.025 do
  918. rut.CFrame = rut.CFrame:Lerp(curcf * CFrame.new(0,4.5,-3),i)
  919. rutj.C0 = rutj.C0:Lerp(CFrame.new(0,-.8,0) * CFrame.Angles(rad(-120),rad(0),rad(180)),i)
  920. rh.C0 = rh.C0:Lerp(CFrame.new(1,-.7,-.3) * CFrame.Angles(rad(-60),rad(90),rad(0)),i)
  921. lh.C0 = lh.C0:Lerp(CFrame.new(-1,-.7,0) * CFrame.Angles(rad(20),rad(-90),rad(0)),i)
  922. rs.C0 = rs.C0:Lerp(CFrame.new(.85,.3,0) * CFrame.Angles(rad(0),rad(90),rad(0)) * CFrame.Angles(rad(0),rad(0),rad(10)),i)
  923. ls.C0 = ls.C0:Lerp(CFrame.new(-.85,.3,0) * CFrame.Angles(rad(0),rad(-90),rad(0)) * CFrame.Angles(rad(0),rad(0),rad(10)),i)
  924. nec.C0 = nec.C0:Lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-80),rad(0),rad(180)),i)
  925. swait()
  926. end
  927. hum.WalkSpeed = oldws
  928. hum.JumpPower = 50
  929. rut.Anchored = false
  930. t.Anchored = false
  931. using = false
  932. grabbedc = false
  933. end
  934. end
  935. walkspeed = hum.WalkSpeed
  936. sumthin = walkspeed/8
  937. animspeed1 = 1.5/sumthin
  938. change = change +sine
  939. if lookinaround then
  940. lchange = lchange +sine
  941. else
  942. lchange = 0
  943. end
  944. local vervel = rut.Velocity.y
  945. local tvel = (rut.Velocity * v3(1,0,1)).Magnitude
  946. local Ccf=rut.CFrame
  947. local Walktest1 = hum.MoveDirection*Ccf.LookVector
  948. local Walktest2 = hum.MoveDirection*Ccf.RightVector
  949. rotfb = Walktest1.X+Walktest1.Z
  950. rotrl = Walktest2.X+Walktest2.Z
  951. if spart then
  952. spart.CFrame = spart.CFrame:Lerp(h.CFrame * CFrame.new(0,15,0),.1)
  953. end
  954. if not hit and anim == "fall" then
  955. readytoland = true
  956. end
  957. if not landed then
  958. if readytoland and hit then
  959. land()
  960. end
  961. if not lookinaround and not sitting then
  962. if anim == "idle" and hit then
  963. --Neck
  964. nec.C1 = nec.C1:Lerp(cf1 * CFrame.new(0,0,cos(change/aa/2.5)/(2.5*10)) * CFrame.Angles(sin(change/aa/2.5)*rad(1),0,-sin(change/aa/2.5)*rad(1)),.1)
  965. --Humanoid Root Part
  966. rutj.C1 = rutj.C1:Lerp(cf2 * CFrame.new(0,cos(change/aa/2.5)/(2.5*10),cos(change/aa/2.5)/(2.5*10)) * CFrame.Angles(sin(change/aa/2.5)*rad(1),0,0),.1)
  967. --Shoulders
  968. rs.C1 = rs.C1:Lerp(cf3 * CFrame.new(-cos(change/aa/2.5)/(2.5*10),cos(change/aa/2.5)/(2.5*10),0) * CFrame.Angles(.1,0,0) * CFrame.Angles(sin(change/aa/1.5)*rad(1),sin(change/aa/2.5)*rad(1),sin(change/aa/2.5)*rad(2.5)),.1)
  969. ls.C1 = ls.C1:Lerp(cf4 * CFrame.new(cos(change/aa/2.5)/(2.5*10),cos(change/aa/2.5)/(2.5*10),0) * CFrame.Angles(.1,0,0) * CFrame.Angles(sin(change/aa/2.5)*rad(1),sin(change/aa/2.5)*rad(1),-sin(change/aa/2.5)*rad(2.5)),.1)
  970. --Hips
  971. rh.C1 = rh.C1:Lerp(cff5 * CFrame.new(cos(change/aa/2.5)/(2.5*10),-cos(change/aa/2.5)/(2.5*10),0) * CFrame.Angles(0,0,sin(change/aa/2.5)*rad(1)) * CFrame.Angles(0,0,0),.1)
  972. lh.C1 = lh.C1:Lerp(cff6 * CFrame.new(-cos(change/aa/2.5)/(2.5*10),-cos(change/aa/2.5)/(2.5*10),0) * CFrame.Angles(0,0,-sin(change/aa/2.5)*rad(1)) * CFrame.Angles(0,0,0),.1)
  973. elseif anim == "sit" then
  974. nec.C1 = nec.C1:Lerp(cf1,.1)
  975. rutj.C1 = rutj.C1:Lerp(cf2,.1)
  976. rs.C1 = rs.C1:Lerp(cf3,.1)
  977. ls.C1 = ls.C1:Lerp(cf4,.1)
  978. rh.C1 = rh.C1:Lerp(cf5,.1)
  979. lh.C1 = lh.C1:Lerp(cf6,.1)
  980. elseif anim == "jump" and not hit then
  981. nec.C1 = nec.C1:Lerp(cf1,.1)
  982. rutj.C1 = rutj.C1:Lerp(cf2,.1)
  983. rs.C1 = rs.C1:Lerp(cf3,.1)
  984. ls.C1 = ls.C1:Lerp(cf4,.1)
  985. rh.C1 = rh.C1:Lerp(cf5,.1)
  986. lh.C1 = lh.C1:Lerp(cf6,.1)
  987. elseif anim == "fall" and not hit then
  988. nec.C1 = nec.C1:Lerp(cf1,.1)
  989. rutj.C1 = rutj.C1:Lerp(cf2,.1)
  990. rs.C1 = rs.C1:Lerp(cf3,.1)
  991. ls.C1 = ls.C1:Lerp(cf4,.1)
  992. rh.C1 = rh.C1:Lerp(cf5,.1)
  993. lh.C1 = lh.C1:Lerp(cf6,.1)
  994. elseif anim == "walk" and hit then
  995. --Neck
  996. nec.C1 = nec.C1:Lerp(cf1 * CFrame.new(0,0,cos(change/aa/animspeed1)/17.5) * CFrame.Angles(-sin(change/aa/animspeed1)*rad(5),-rut.RotVelocity.y/90,rut.RotVelocity.y/60),walkanimspeed)
  997. --Humanoid Root Part
  998. rutj.C1 = rutj.C1:Lerp(cf2 * CFrame.new(0,0,cos(change/aa/animspeed1)/15) * CFrame.Angles(sin(change/aa/animspeed1)*rad(2.5*sumthin),-rut.RotVelocity.y/100,sin(change/aa/animspeed1)*rad(5*sumthin) * -rut.RotVelocity.y/100) * CFrame.Angles(-rotfb/5,rotrl/5,0),walkanimspeed)
  999. --Shoulders
  1000. rs.C1 = rs.C1:Lerp(cf3 * CFrame.new(0,0,0) * CFrame.Angles(-sin(change/aa/animspeed1)*rad(3*sumthin)*rotfb,-sin(change/aa/animspeed1)*rad(10)*rotfb,0) * CFrame.Angles(sin(change/aa/animspeed1)*rad(5*sumthin)*rotrl,-sin(change/aa/animspeed1)*rad(5*sumthin)*rotrl,-sin(change/aa/animspeed1)*rad(35*sumthin)*rotfb or rotfl),walkanimspeed)
  1001. ls.C1 = ls.C1:Lerp(cf4 * CFrame.new(0,0,0) * CFrame.Angles(sin(change/aa/animspeed1)*rad(3*sumthin)*rotfb,-sin(change/aa/animspeed1)*rad(10)*rotfb,0) * CFrame.Angles(sin(change/aa/animspeed1)*rad(5*sumthin)*rotrl,-sin(change/aa/animspeed1)*rad(5*sumthin)*rotrl,-sin(change/aa/animspeed1)*rad(35*sumthin)*rotfb or rotfl),walkanimspeed)
  1002. --Hips
  1003. rh.C1 = rh.C1:Lerp(cf5 * CFrame.new((cos(change/aa/animspeed1)/3.5)*rotfb or (cos(change/aa/animspeed1)/3.5)*rotrl,(cos(change/aa/animspeed1)/4),(cos(change/aa/animspeed1)/4)*rotrl) * CFrame.Angles(-sin(change/aa/animspeed1)*rad(15*sumthin)*rotrl,-sin(change/aa/animspeed1)*rad(15*sumthin)*rotrl,sin(change/aa/animspeed1)*rad(30*sumthin)*rotfb),walkanimspeed)
  1004. lh.C1 = lh.C1:Lerp(cf6 * CFrame.new((cos(change/aa/animspeed1)/3.5)*rotfb or (cos(change/aa/animspeed1)/3.5)*rotrl,(-cos(change/aa/animspeed1)/4),(cos(change/aa/animspeed1)/4)*rotrl) * CFrame.Angles(-sin(change/aa/animspeed1)*rad(15*sumthin)*rotrl,-sin(change/aa/animspeed1)*rad(15*sumthin)*rotrl,sin(change/aa/animspeed1)*rad(30*sumthin)*rotfb),walkanimspeed)
  1005. end
  1006. if not grabbedc then
  1007. if vervel > 1 and hum.Sit == false then
  1008. anim = "jump"
  1009. if not using then
  1010. rutj.C0 = rutj.C0:Lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(-80),rad(0),rad(180)),animspeed*50)
  1011. rh.C0 = rh.C0:Lerp(CFrame.new(1,-.1,-.4) * CFrame.Angles(rad(-10),rad(85),rad(0)),animspeed*50)
  1012. lh.C0 = lh.C0:Lerp(CFrame.new(-1,-.4,-.25) * CFrame.Angles(rad(-10),rad(-85),rad(0)),animspeed*50)
  1013. rs.C0 = rs.C0:Lerp(CFrame.new(1,.25,0) * CFrame.Angles(rad(0),rad(90),rad(0)) * CFrame.Angles(rad(-40),rad(0),rad(0)),animspeed*50)
  1014. ls.C0 = ls.C0:Lerp(CFrame.new(-1,.25,-0) * CFrame.Angles(rad(0),rad(-90),rad(0)) * CFrame.Angles(rad(-40),rad(0),rad(0)),animspeed*50)
  1015. nec.C0 = nec.C0:Lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-100),rad(0),rad(180)),animspeed*50)
  1016. end
  1017. elseif vervel < -1 and hum.Sit == false then
  1018. anim = "fall"
  1019. if not using then
  1020. rutj.C0 = rutj.C0:Lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(-80),rad(0),rad(180)),.00025)
  1021. rh.C0 = rh.C0:Lerp(CFrame.new(1,-.1,-.4) * CFrame.Angles(rad(-10),rad(85),rad(0)),.00025)
  1022. lh.C0 = lh.C0:Lerp(CFrame.new(-1,-.55,-.25) * CFrame.Angles(rad(-10),rad(-85),rad(0)),.00025)
  1023. rs.C0 = rs.C0:Lerp(CFrame.new(1,.35,0) * CFrame.Angles(rad(0),rad(90),rad(0)) * CFrame.Angles(rad(-50),rad(0),rad(0)),.00025)
  1024. ls.C0 = ls.C0:Lerp(CFrame.new(-1,.25,-0) * CFrame.Angles(rad(0),rad(-90),rad(0)) * CFrame.Angles(rad(-50),rad(0),rad(0)),.00025)
  1025. nec.C0 = nec.C0:Lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-110),rad(0),rad(180)),.00025)
  1026. end
  1027. elseif tvel < 1 and hum.Sit == false then
  1028. anim = "idle"
  1029. if not using then
  1030. rutj.C0 = rutj.C0:Lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),animspeed*50)
  1031. rh.C0 = rh.C0:Lerp(CFrame.new(1,-1,0) * CFrame.Angles(rad(0),rad(90),rad(0)),animspeed*50)
  1032. lh.C0 = lh.C0:Lerp(CFrame.new(-1,-1,0) * CFrame.Angles(rad(0),rad(-90),rad(0)),animspeed*50)
  1033. rs.C0 = rs.C0:Lerp(CFrame.new(1,.5,0) * CFrame.Angles(rad(0),rad(90),rad(0)),animspeed*50)
  1034. ls.C0 = ls.C0:Lerp(CFrame.new(-1,.5,0) * CFrame.Angles(rad(0),rad(-90),rad(0)),animspeed*50)
  1035. nec.C0 = nec.C0:Lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),animspeed*50)
  1036. end
  1037. elseif tvel > 1 and hum.Sit == false then
  1038. anim = "walk"
  1039. if not using then
  1040. rutj.C0 = rutj.C0:Lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(-90),rad(0),rad(180)) * CFrame.Angles(rad(0*sumthin),rad(0),rad(0)),animspeed*50)
  1041. rh.C0 = rh.C0:Lerp(CFrame.new(1,-.8+rotrl/4,-.15) * CFrame.Angles(rad(0),rad(90),rad(-10)) * CFrame.Angles(rad(0),rad(0),-sin(change/aa/animspeed1)*rad(10*sumthin)*rotrl) * CFrame.Angles(-rotrl/5,-rotrl/5,rotfb/5),animspeed*50)
  1042. lh.C0 = lh.C0:Lerp(CFrame.new(-1,-.8-rotrl/4,-.15) * CFrame.Angles(rad(0),rad(-90),rad(10)) * CFrame.Angles(rad(0),rad(0),-sin(change/aa/animspeed1)*rad(10*sumthin)*rotrl) * CFrame.Angles(rotrl/5,-rotrl/5,-rotfb/5),animspeed*50)
  1043. rs.C0 = rs.C0:Lerp(CFrame.new(1,.5,0) * CFrame.Angles(sin(change/aa/animspeed1)*rad(10*sumthin)*rotrl,rad(90),rad(0)) * CFrame.Angles(rad(0),rad(0),rad(5*sumthin)),animspeed*50)
  1044. ls.C0 = ls.C0:Lerp(CFrame.new(-1,.5,0) * CFrame.Angles(-sin(change/aa/animspeed1)*rad(10*sumthin)*rotrl,rad(-90),rad(0)) * CFrame.Angles(rad(0),rad(0),rad(-5*sumthin)),animspeed*50)
  1045. nec.C0 = nec.C0:Lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)) * CFrame.Angles(rad(-5*sumthin),rad(0),rad(-40*rotrl)),animspeed*50)
  1046. end
  1047. elseif hum.Sit == true then
  1048. anim = "sit"
  1049. if not using then
  1050. if not furmode then
  1051. rutj.C0 = rutj.C0:Lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),animspeed*50)
  1052. rh.C0 = rh.C0:Lerp(CFrame.new(1,-1,0) * CFrame.Angles(rad(0),rad(90),rad(0)) * CFrame.Angles(rad(0),rad(0),rad(90)),animspeed*50)
  1053. lh.C0 = lh.C0:Lerp(CFrame.new(-1,-1,0) * CFrame.Angles(rad(0),rad(-90),rad(0)) * CFrame.Angles(rad(0),rad(0),rad(-90)),animspeed*50)
  1054. rs.C0 = rs.C0:Lerp(CFrame.new(1,.5,0) * CFrame.Angles(rad(0),rad(90),rad(30)) * CFrame.Angles(rad(30),rad(0),rad(0)),animspeed*50)
  1055. ls.C0 = ls.C0:Lerp(CFrame.new(-1,.5,0) * CFrame.Angles(rad(0),rad(-90),rad(-30)) * CFrame.Angles(rad(30),rad(0),rad(0)),animspeed*50)
  1056. nec.C0 = nec.C0:Lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-95),rad(0),rad(180)),animspeed*50)
  1057. else
  1058. rutj.C0 = rutj.C0:Lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(-105),rad(0),rad(180)),animspeed*50)
  1059. rh.C0 = rh.C0:Lerp(CFrame.new(1,-1,0) * CFrame.Angles(rad(15),rad(90),rad(0)) * CFrame.Angles(rad(0),rad(-20),rad(90)),animspeed*50)
  1060. lh.C0 = lh.C0:Lerp(CFrame.new(-1,-1,0) * CFrame.Angles(rad(15),rad(-90),rad(0)) * CFrame.Angles(rad(0),rad(20),rad(-90)),animspeed*50)
  1061. rs.C0 = rs.C0:Lerp(CFrame.new(.5,.2,-.3) * CFrame.Angles(rad(-10),rad(95),rad(30)) * CFrame.Angles(rad(25),rad(20),rad(0)),animspeed*50)
  1062. ls.C0 = ls.C0:Lerp(CFrame.new(-.5,.2,-.3) * CFrame.Angles(rad(-10),rad(-95),rad(-30)) * CFrame.Angles(rad(25),rad(-20),rad(0)),animspeed*50)
  1063. nec.C0 = nec.C0:Lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-75),rad(0),rad(180)),animspeed*50)
  1064. end
  1065. end
  1066. else
  1067. nec.C1 = nec.C1:Lerp(cf1,animspeed*50)
  1068. rutj.C1 = rutj.C1:Lerp(cf2,animspeed*50)
  1069. rs.C1 = rs.C1:Lerp(cf3,animspeed*50)
  1070. ls.C1 = ls.C1:Lerp(cf4,animspeed*50)
  1071. rh.C1 = rh.C1:Lerp(cf5,animspeed*50)
  1072. lh.C1 = lh.C1:Lerp(cf6,animspeed*50)
  1073. end
  1074. end
  1075. end
  1076. end
  1077. if sitting then
  1078. nec.C1 = nec.C1:Lerp(cf1 * CFrame.new(0,0,cos(change/aa)/(2.5*10)) * CFrame.Angles(sin(change/aa/1.5)*rad(2.5),0,-sin(change/aa/1.5)*rad(2.5)),.1)
  1079. rutj.C1 = rutj.C1:Lerp(cf2,.1)
  1080. rs.C1 = rs.C1:Lerp(cf3,.1)
  1081. ls.C1 = ls.C1:Lerp(cf4,.1)
  1082. rh.C1 = rh.C1:Lerp(cf5,.1)
  1083. lh.C1 = lh.C1:Lerp(cf6,.1)
  1084. end
  1085. coroutine.resume(coroutine.create(function()
  1086. if not using and anim == "idle" then
  1087. if not lookinaround then
  1088. idlenum = idlenum +.005
  1089. if idlenum >= whenbored then
  1090. idlenum = 0
  1091. local oldws = hum.WalkSpeed
  1092. local oldjp = hum.JumpPower
  1093. hum.WalkSpeed = 0
  1094. hum.JumpPower = 0
  1095. rut.Anchored = true
  1096. rh.Part0 = rut
  1097. lh.Part0 = rut
  1098. using = true
  1099. lookinaround = true
  1100. wait(3)
  1101. hum.WalkSpeed = oldws
  1102. hum.JumpPower = oldjp
  1103. rut.Anchored = false
  1104. using = false
  1105. rh.Part0 = t
  1106. lh.Part0 = t
  1107. whenbored = math.random(2,6)
  1108. lookinaround = false
  1109. end
  1110. end
  1111. elseif using then
  1112. idlenum = 0
  1113. elseif anim ~= "idle" then
  1114. idlenum = 0
  1115. end
  1116. end))
  1117. if lookinaround then
  1118. --Neck
  1119. nec.C1 = nec.C1:Lerp(cf1 * CFrame.new(0,0,0) * CFrame.Angles(sin(lchange/aa/1.5)*rad(10),cos(lchange/aa/1.5)*rad(5),-sin(lchange/aa/3)*rad(40)),.1)
  1120. --Humanoid Root Part
  1121. rutj.C1 = rutj.C1:Lerp(cf2 * CFrame.new(0,0,0) * CFrame.Angles(cos(lchange/aa/1.5)*rad(5),cos(lchange/aa/1.5)*rad(5),-sin(lchange/aa/3)*rad(20)),.1)
  1122. --Shoulders
  1123. rs.C1 = rs.C1:Lerp(cf3 * CFrame.new(-cos(lchange/aa/3)/(3*10),cos(lchange/aa/3)/(3*10),0) * CFrame.Angles(.1,0,0) * CFrame.Angles(-sin(lchange/aa/3)*rad(12.5),-sin(lchange/aa/3)*rad(12.5),-sin(lchange/aa/3)*rad(15)),.1)
  1124. ls.C1 = ls.C1:Lerp(cf4 * CFrame.new(cos(lchange/aa/3)/(3*10),cos(lchange/aa/3)/(3*10),0) * CFrame.Angles(.1,0,0) * CFrame.Angles(sin(lchange/aa/3)*rad(12.5),-sin(lchange/aa/3)*rad(12.5),-sin(lchange/aa/3)*rad(15)),.1)
  1125. --Hips
  1126. rh.C1 = rh.C1:Lerp(cff5 * CFrame.new(0,0,0) * CFrame.Angles(0,0,0) * CFrame.Angles(0,0,0),.1)
  1127. lh.C1 = lh.C1:Lerp(cff6 * CFrame.new(0,0,0) * CFrame.Angles(0,0,0) * CFrame.Angles(0,0,0),.1)
  1128. end
  1129. swait()
  1130. end
  1131. end)
  1132. anims()
  1133. introhat()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement