Advertisement
lafur

Untitled

Sep 6th, 2018
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 113.96 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,Mouse,mouse,UserInputService,ContextActionService = owner
  4. local RealPlayer = Player
  5. do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end --Converted with ttyyuu12345's model to script plugin v4
  6. function sandbox(var,func)
  7. local env = getfenv(func)
  8. local newenv = setmetatable({},{
  9. __index = function(self,k)
  10. if k=="script" then
  11. return var
  12. else
  13. return env[k]
  14. end
  15. end,
  16. })
  17. setfenv(func,newenv)
  18. return func
  19. end
  20. cors = {}
  21. mas = Instance.new("Model",game:GetService("Lighting"))
  22. Model0 = Instance.new("Model")
  23. Part1 = Instance.new("Part")
  24. SpecialMesh2 = Instance.new("SpecialMesh")
  25. Sound3 = Instance.new("Sound")
  26. RemoteEvent4 = Instance.new("RemoteEvent")
  27. Sound5 = Instance.new("Sound")
  28. RemoteEvent6 = Instance.new("RemoteEvent")
  29. Sound7 = Instance.new("Sound")
  30. RemoteEvent8 = Instance.new("RemoteEvent")
  31. Sound9 = Instance.new("Sound")
  32. RemoteEvent10 = Instance.new("RemoteEvent")
  33. Sound11 = Instance.new("Sound")
  34. RemoteEvent12 = Instance.new("RemoteEvent")
  35. Sound13 = Instance.new("Sound")
  36. RemoteEvent14 = Instance.new("RemoteEvent")
  37. Sound15 = Instance.new("Sound")
  38. RemoteEvent16 = Instance.new("RemoteEvent")
  39. Sound17 = Instance.new("Sound")
  40. RemoteEvent18 = Instance.new("RemoteEvent")
  41. Sound19 = Instance.new("Sound")
  42. RemoteEvent20 = Instance.new("RemoteEvent")
  43. Sound21 = Instance.new("Sound")
  44. Sound22 = Instance.new("Sound")
  45. Sound23 = Instance.new("Sound")
  46. PointLight24 = Instance.new("PointLight")
  47. Decal25 = Instance.new("Decal")
  48. Weld26 = Instance.new("Weld")
  49. Part27 = Instance.new("Part")
  50. Decal28 = Instance.new("Decal")
  51. Motor6D29 = Instance.new("Motor6D")
  52. Motor6D30 = Instance.new("Motor6D")
  53. Motor6D31 = Instance.new("Motor6D")
  54. Motor6D32 = Instance.new("Motor6D")
  55. Motor6D33 = Instance.new("Motor6D")
  56. Part34 = Instance.new("Part")
  57. Weld35 = Instance.new("Weld")
  58. Part36 = Instance.new("Part")
  59. Weld37 = Instance.new("Weld")
  60. Weld38 = Instance.new("Weld")
  61. Part39 = Instance.new("Part")
  62. Part40 = Instance.new("Part")
  63. Humanoid41 = Instance.new("Humanoid")
  64. Model42 = Instance.new("Model")
  65. Model43 = Instance.new("Model")
  66. Part44 = Instance.new("Part")
  67. Motor6D45 = Instance.new("Motor6D")
  68. Script46 = Instance.new("Script")
  69. LocalScript47 = Instance.new("LocalScript")
  70. Script48 = Instance.new("Script")
  71. Accessory49 = Instance.new("Accessory")
  72. Part50 = Instance.new("Part")
  73. SpecialMesh51 = Instance.new("SpecialMesh")
  74. Vector3Value52 = Instance.new("Vector3Value")
  75. Weld53 = Instance.new("Weld")
  76. BodyColors54 = Instance.new("BodyColors")
  77. Accessory55 = Instance.new("Accessory")
  78. Part56 = Instance.new("Part")
  79. SpecialMesh57 = Instance.new("SpecialMesh")
  80. Vector3Value58 = Instance.new("Vector3Value")
  81. Weld59 = Instance.new("Weld")
  82. Camera60 = Instance.new("Camera")
  83. Pants61 = Instance.new("Pants")
  84. ShirtGraphic62 = Instance.new("ShirtGraphic")
  85. CharacterMesh63 = Instance.new("CharacterMesh")
  86. CharacterMesh64 = Instance.new("CharacterMesh")
  87. Animation65 = Instance.new("Animation")
  88. Accessory66 = Instance.new("Accessory")
  89. Part67 = Instance.new("Part")
  90. SpecialMesh68 = Instance.new("SpecialMesh")
  91. Vector3Value69 = Instance.new("Vector3Value")
  92. Shirt70 = Instance.new("Shirt")
  93. CharacterMesh71 = Instance.new("CharacterMesh")
  94. CharacterMesh72 = Instance.new("CharacterMesh")
  95. Script73 = Instance.new("Script")
  96. StringValue74 = Instance.new("StringValue")
  97. Animation75 = Instance.new("Animation")
  98. StringValue76 = Instance.new("StringValue")
  99. Animation77 = Instance.new("Animation")
  100. StringValue78 = Instance.new("StringValue")
  101. Animation79 = Instance.new("Animation")
  102. NumberValue80 = Instance.new("NumberValue")
  103. Animation81 = Instance.new("Animation")
  104. NumberValue82 = Instance.new("NumberValue")
  105. StringValue83 = Instance.new("StringValue")
  106. Animation84 = Instance.new("Animation")
  107. StringValue85 = Instance.new("StringValue")
  108. Animation86 = Instance.new("Animation")
  109. StringValue87 = Instance.new("StringValue")
  110. Animation88 = Instance.new("Animation")
  111. StringValue89 = Instance.new("StringValue")
  112. Animation90 = Instance.new("Animation")
  113. StringValue91 = Instance.new("StringValue")
  114. Animation92 = Instance.new("Animation")
  115. Script93 = Instance.new("Script")
  116. Script94 = Instance.new("Script")
  117. Script95 = Instance.new("Script")
  118. Tool96 = Instance.new("Tool")
  119. Part97 = Instance.new("Part")
  120. Sound98 = Instance.new("Sound")
  121. FileMesh99 = Instance.new("FileMesh")
  122. ParticleEmitter100 = Instance.new("ParticleEmitter")
  123. ParticleEmitter101 = Instance.new("ParticleEmitter")
  124. ParticleEmitter102 = Instance.new("ParticleEmitter")
  125. ParticleEmitter103 = Instance.new("ParticleEmitter")
  126. Sound104 = Instance.new("Sound")
  127. LocalScript105 = Instance.new("LocalScript")
  128. LocalScript106 = Instance.new("LocalScript")
  129. ScreenGui107 = Instance.new("ScreenGui")
  130. TextLabel108 = Instance.new("TextLabel")
  131. Sound109 = Instance.new("Sound")
  132. Sound110 = Instance.new("Sound")
  133. Sound111 = Instance.new("Sound")
  134. CharacterMesh112 = Instance.new("CharacterMesh")
  135. Camera113 = Instance.new("Camera")
  136. Model0.Name = "Clown"
  137. Model0.Parent = mas
  138. Model0.PrimaryPart = Part1
  139. Part1.Name = "Head"
  140. Part1.Parent = Model0
  141. Part1.CFrame = CFrame.new(-10.9200058, 4.50000095, 78.230011, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  142. Part1.Position = Vector3.new(-10.9200058, 4.50000095, 78.230011)
  143. Part1.Color = Color3.new(0.972549, 0.972549, 0.972549)
  144. Part1.Size = Vector3.new(2, 1, 1)
  145. Part1.BrickColor = BrickColor.new("Institutional white")
  146. Part1.TopSurface = Enum.SurfaceType.Smooth
  147. Part1.brickColor = BrickColor.new("Institutional white")
  148. Part1.FormFactor = Enum.FormFactor.Symmetric
  149. Part1.formFactor = Enum.FormFactor.Symmetric
  150. SpecialMesh2.Parent = Part1
  151. SpecialMesh2.Scale = Vector3.new(1.25, 1.25, 1.25)
  152. Sound3.Name = "GettingUp"
  153. Sound3.Parent = Part1
  154. Sound3.MaxDistance = 150
  155. Sound3.EmitterSize = 5
  156. Sound3.MinDistance = 5
  157. Sound3.SoundId = "rbxasset://sounds/action_get_up.mp3"
  158. Sound3.Volume = 0.64999997615814
  159. RemoteEvent4.Name = "CharacterSoundEvent"
  160. RemoteEvent4.Parent = Sound3
  161. Sound5.Name = "Died"
  162. Sound5.Parent = Part1
  163. Sound5.MaxDistance = 150
  164. Sound5.EmitterSize = 5
  165. Sound5.MinDistance = 5
  166. Sound5.SoundId = "rbxasset://sounds/uuhhh.mp3"
  167. Sound5.Volume = 0.64999997615814
  168. RemoteEvent6.Name = "CharacterSoundEvent"
  169. RemoteEvent6.Parent = Sound5
  170. Sound7.Name = "FreeFalling"
  171. Sound7.Parent = Part1
  172. Sound7.Looped = true
  173. Sound7.TimePosition = 0.23380919942974
  174. Sound7.MaxDistance = 150
  175. Sound7.EmitterSize = 5
  176. Sound7.MinDistance = 5
  177. Sound7.SoundId = "rbxasset://sounds/action_falling.mp3"
  178. Sound7.Volume = 0
  179. RemoteEvent8.Name = "CharacterSoundEvent"
  180. RemoteEvent8.Parent = Sound7
  181. Sound9.Name = "Jumping"
  182. Sound9.Parent = Part1
  183. Sound9.MaxDistance = 150
  184. Sound9.EmitterSize = 5
  185. Sound9.MinDistance = 5
  186. Sound9.SoundId = "rbxasset://sounds/action_jump.mp3"
  187. Sound9.Volume = 0.64999997615814
  188. RemoteEvent10.Name = "CharacterSoundEvent"
  189. RemoteEvent10.Parent = Sound9
  190. Sound11.Name = "Landing"
  191. Sound11.Parent = Part1
  192. Sound11.MaxDistance = 150
  193. Sound11.EmitterSize = 5
  194. Sound11.MinDistance = 5
  195. Sound11.SoundId = "rbxasset://sounds/action_jump_land.mp3"
  196. Sound11.Volume = 1
  197. RemoteEvent12.Name = "CharacterSoundEvent"
  198. RemoteEvent12.Parent = Sound11
  199. Sound13.Name = "Splash"
  200. Sound13.Parent = Part1
  201. Sound13.MaxDistance = 150
  202. Sound13.EmitterSize = 5
  203. Sound13.MinDistance = 5
  204. Sound13.SoundId = "rbxasset://sounds/impact_water.mp3"
  205. Sound13.Volume = 0.64999997615814
  206. RemoteEvent14.Name = "CharacterSoundEvent"
  207. RemoteEvent14.Parent = Sound13
  208. Sound15.Name = "Running"
  209. Sound15.Parent = Part1
  210. Sound15.Looped = true
  211. Sound15.MaxDistance = 150
  212. Sound15.EmitterSize = 5
  213. Sound15.MinDistance = 5
  214. Sound15.Pitch = 1.8500000238419
  215. Sound15.PlaybackSpeed = 1.8500000238419
  216. Sound15.SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3"
  217. Sound15.Volume = 0.64999997615814
  218. RemoteEvent16.Name = "CharacterSoundEvent"
  219. RemoteEvent16.Parent = Sound15
  220. Sound17.Name = "Swimming"
  221. Sound17.Parent = Part1
  222. Sound17.Looped = true
  223. Sound17.MaxDistance = 150
  224. Sound17.EmitterSize = 5
  225. Sound17.MinDistance = 5
  226. Sound17.Pitch = 1.6000000238419
  227. Sound17.PlaybackSpeed = 1.6000000238419
  228. Sound17.SoundId = "rbxasset://sounds/action_swim.mp3"
  229. Sound17.Volume = 0.64999997615814
  230. RemoteEvent18.Name = "CharacterSoundEvent"
  231. RemoteEvent18.Parent = Sound17
  232. Sound19.Name = "Climbing"
  233. Sound19.Parent = Part1
  234. Sound19.Looped = true
  235. Sound19.MaxDistance = 150
  236. Sound19.EmitterSize = 5
  237. Sound19.MinDistance = 5
  238. Sound19.SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3"
  239. Sound19.Volume = 0.64999997615814
  240. RemoteEvent20.Name = "CharacterSoundEvent"
  241. RemoteEvent20.Parent = Sound19
  242. Sound21.Parent = Part1
  243. Sound21.Looped = true
  244. Sound21.Playing = true
  245. Sound21.SoundId = "rbxassetid://531100211"
  246. Sound22.Name = "Jeff_Susto2"
  247. Sound22.Parent = Part1
  248. Sound22.Playing = true
  249. Sound22.SoundId = "rbxassetid://380102473"
  250. Sound22.Volume = 1
  251. Sound23.Parent = Part1
  252. Sound23.Looped = true
  253. Sound23.Playing = true
  254. Sound23.SoundId = "rbxassetid://815335430"
  255. Sound23.Volume = 1
  256. PointLight24.Parent = Part1
  257. PointLight24.Color = Color3.new(1, 0, 0)
  258. PointLight24.Range = 9
  259. PointLight24.Brightness = 9
  260. Decal25.Parent = Part1
  261. Decal25.Texture = "http://www.roblox.com/asset/?id=1004502106"
  262. Weld26.Name = "HeadWeld"
  263. Weld26.Parent = Part1
  264. Weld26.C0 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  265. Weld26.C1 = CFrame.new(0, 0.649999976, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  266. Weld26.Part0 = Part1
  267. Weld26.Part1 = Part67
  268. Weld26.part1 = Part67
  269. Part27.Name = "Torso"
  270. Part27.Parent = Model0
  271. Part27.CFrame = CFrame.new(-10.9200058, 3.00000095, 78.230011, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  272. Part27.Position = Vector3.new(-10.9200058, 3.00000095, 78.230011)
  273. Part27.Color = Color3.new(0.972549, 0.972549, 0.972549)
  274. Part27.Size = Vector3.new(2, 2, 1)
  275. Part27.BrickColor = BrickColor.new("Institutional white")
  276. Part27.LeftParamA = 0
  277. Part27.LeftParamB = 0
  278. Part27.LeftSurface = Enum.SurfaceType.Weld
  279. Part27.RightParamA = 0
  280. Part27.RightParamB = 0
  281. Part27.RightSurface = Enum.SurfaceType.Weld
  282. Part27.brickColor = BrickColor.new("Institutional white")
  283. Part27.FormFactor = Enum.FormFactor.Symmetric
  284. Part27.formFactor = Enum.FormFactor.Symmetric
  285. Decal28.Name = "roblox"
  286. Decal28.Parent = Part27
  287. Decal28.Texture = "http://www.roblox.com/asset/?id=1166033059"
  288. Motor6D29.Name = "Right Shoulder"
  289. Motor6D29.Parent = Part27
  290. Motor6D29.MaxVelocity = 0.10000000149012
  291. Motor6D29.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  292. Motor6D29.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  293. Motor6D29.Part0 = Part27
  294. Motor6D29.Part1 = Part36
  295. Motor6D29.part1 = Part36
  296. Motor6D30.Name = "Left Shoulder"
  297. Motor6D30.Parent = Part27
  298. Motor6D30.MaxVelocity = 0.10000000149012
  299. Motor6D30.C0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  300. Motor6D30.C1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  301. Motor6D30.Part0 = Part27
  302. Motor6D30.Part1 = Part34
  303. Motor6D30.part1 = Part34
  304. Motor6D31.Name = "Right Hip"
  305. Motor6D31.Parent = Part27
  306. Motor6D31.MaxVelocity = 0.10000000149012
  307. Motor6D31.C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  308. Motor6D31.C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  309. Motor6D31.Part0 = Part27
  310. Motor6D31.Part1 = Part40
  311. Motor6D31.part1 = Part40
  312. Motor6D32.Name = "Left Hip"
  313. Motor6D32.Parent = Part27
  314. Motor6D32.MaxVelocity = 0.10000000149012
  315. Motor6D32.C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  316. Motor6D32.C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  317. Motor6D32.Part0 = Part27
  318. Motor6D32.Part1 = Part39
  319. Motor6D32.part1 = Part39
  320. Motor6D33.Name = "Neck"
  321. Motor6D33.Parent = Part27
  322. Motor6D33.MaxVelocity = 0.10000000149012
  323. Motor6D33.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  324. Motor6D33.C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  325. Motor6D33.Part0 = Part27
  326. Motor6D33.Part1 = Part1
  327. Motor6D33.part1 = Part1
  328. Part34.Name = "Left Arm"
  329. Part34.Parent = Model0
  330. Part34.CFrame = CFrame.new(-12.4200058, 3.00000095, 78.230011, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  331. Part34.Position = Vector3.new(-12.4200058, 3.00000095, 78.230011)
  332. Part34.Color = Color3.new(0.972549, 0.972549, 0.972549)
  333. Part34.Size = Vector3.new(1, 2, 1)
  334. Part34.BrickColor = BrickColor.new("Institutional white")
  335. Part34.CanCollide = false
  336. Part34.brickColor = BrickColor.new("Institutional white")
  337. Part34.FormFactor = Enum.FormFactor.Symmetric
  338. Part34.formFactor = Enum.FormFactor.Symmetric
  339. Weld35.Name = "LeftGrip"
  340. Weld35.Parent = Part34
  341. Weld35.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
  342. Weld35.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
  343. Weld35.Part0 = Part34
  344. Weld35.Part1 = Part34
  345. Weld35.part1 = Part34
  346. Part36.Name = "Right Arm"
  347. Part36.Parent = Model0
  348. Part36.CFrame = CFrame.new(-9.4200058, 3.00000095, 78.230011, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  349. Part36.Position = Vector3.new(-9.4200058, 3.00000095, 78.230011)
  350. Part36.Color = Color3.new(0.972549, 0.972549, 0.972549)
  351. Part36.Size = Vector3.new(1, 2, 1)
  352. Part36.BrickColor = BrickColor.new("Institutional white")
  353. Part36.CanCollide = false
  354. Part36.brickColor = BrickColor.new("Institutional white")
  355. Part36.FormFactor = Enum.FormFactor.Symmetric
  356. Part36.formFactor = Enum.FormFactor.Symmetric
  357. Weld37.Name = "RightGripWeld"
  358. Weld37.Parent = Part36
  359. Weld37.C0 = CFrame.new(-1.29999995, 1.16840947, 0.750634551, 1, 0, 0, 0, 0.968409479, 0.249365434, 0, -0.249365434, 0.968409479)
  360. Weld37.C1 = CFrame.new(-1.5, -0, -0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  361. Weld38.Name = "RightGrip"
  362. Weld38.Parent = Part36
  363. Weld38.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
  364. Weld38.C1 = CFrame.new(0, -0.800000012, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  365. Weld38.Part0 = Part36
  366. Weld38.Part1 = Part97
  367. Weld38.part1 = Part97
  368. Part39.Name = "Left Leg"
  369. Part39.Parent = Model0
  370. Part39.CFrame = CFrame.new(-11.4200058, 1.00000095, 78.230011, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  371. Part39.Position = Vector3.new(-11.4200058, 1.00000095, 78.230011)
  372. Part39.Color = Color3.new(0.972549, 0.972549, 0.972549)
  373. Part39.Size = Vector3.new(1, 2, 1)
  374. Part39.BottomSurface = Enum.SurfaceType.Smooth
  375. Part39.BrickColor = BrickColor.new("Institutional white")
  376. Part39.CanCollide = false
  377. Part39.brickColor = BrickColor.new("Institutional white")
  378. Part39.FormFactor = Enum.FormFactor.Symmetric
  379. Part39.formFactor = Enum.FormFactor.Symmetric
  380. Part40.Name = "Right Leg"
  381. Part40.Parent = Model0
  382. Part40.CFrame = CFrame.new(-10.4200058, 1.00000095, 78.230011, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  383. Part40.Position = Vector3.new(-10.4200058, 1.00000095, 78.230011)
  384. Part40.Color = Color3.new(0.972549, 0.972549, 0.972549)
  385. Part40.Size = Vector3.new(1, 2, 1)
  386. Part40.BottomSurface = Enum.SurfaceType.Smooth
  387. Part40.BrickColor = BrickColor.new("Institutional white")
  388. Part40.CanCollide = false
  389. Part40.brickColor = BrickColor.new("Institutional white")
  390. Part40.FormFactor = Enum.FormFactor.Symmetric
  391. Part40.formFactor = Enum.FormFactor.Symmetric
  392. Humanoid41.Name = "ColdBloodedKiller"
  393. Humanoid41.Parent = Model0
  394. Humanoid41.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
  395. Humanoid41.Health = 500
  396. Humanoid41.HealthDisplayDistance = 0
  397. Humanoid41.JumpPower = 60
  398. Humanoid41.LeftLeg = Part39
  399. Humanoid41.MaxHealth = 500
  400. Humanoid41.MaxSlopeAngle = 89.900001525879
  401. Humanoid41.NameDisplayDistance = 0
  402. Humanoid41.NameOcclusion = Enum.NameOcclusion.EnemyOcclusion
  403. Humanoid41.RightLeg = Part40
  404. Humanoid41.Torso = Part44
  405. Humanoid41.maxHealth = 500
  406. Model42.Name = "Status"
  407. Model42.Parent = Humanoid41
  408. Model43.Name = "AvalibleSpawns"
  409. Model43.Parent = Model42
  410. Part44.Name = "HumanoidRootPart"
  411. Part44.Parent = Model0
  412. Part44.CFrame = CFrame.new(-10.9200058, 3.00000095, 78.230011, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  413. Part44.Position = Vector3.new(-10.9200058, 3.00000095, 78.230011)
  414. Part44.Transparency = 1
  415. Part44.Size = Vector3.new(2, 2, 1)
  416. Part44.BottomSurface = Enum.SurfaceType.Smooth
  417. Part44.CanCollide = false
  418. Part44.LeftParamA = 0
  419. Part44.LeftParamB = 0
  420. Part44.RightParamA = 0
  421. Part44.RightParamB = 0
  422. Part44.TopSurface = Enum.SurfaceType.Smooth
  423. Part44.FormFactor = Enum.FormFactor.Symmetric
  424. Part44.formFactor = Enum.FormFactor.Symmetric
  425. Motor6D45.Name = "RootJoint"
  426. Motor6D45.Parent = Part44
  427. Motor6D45.MaxVelocity = 0.10000000149012
  428. Motor6D45.C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  429. Motor6D45.C1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  430. Motor6D45.Part0 = Part44
  431. Motor6D45.Part1 = Part27
  432. Motor6D45.part1 = Part27
  433. Script46.Name = "Sound"
  434. Script46.Parent = Model0
  435. table.insert(cors,sandbox(Script46,function()
  436. --[[
  437. Author: @spotco
  438. This script creates sounds which are placed under the character head.
  439. These sounds are used by the "LocalSound" script.
  440.  
  441. To modify this script, copy it to your "StarterPlayer/StarterCharacterScripts" folder keeping the same script name ("Sound").
  442. The default Sound script loaded for every character will then be replaced with your copy of the script.
  443. ]]--
  444. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  445. local Players = game:GetService("Players")
  446.  
  447. local SOUND_EVENT_FOLDER_NAME = "DefaultSoundEvents"
  448. local DEFAULT_SERVER_SOUND_EVENT_NAME = "DefaultServerSoundEvent"
  449.  
  450. local SoundEventFolder = ReplicatedStorage:FindFirstChild(SOUND_EVENT_FOLDER_NAME)
  451. local DefaultServerSoundEvent = nil
  452.  
  453. local useSoundDispatcher = UserSettings():IsUserFeatureEnabled("UserUseSoundDispatcher")
  454. if useSoundDispatcher then
  455. if not SoundEventFolder then
  456. SoundEventFolder = Instance.new("Folder")
  457. SoundEventFolder.Name = SOUND_EVENT_FOLDER_NAME
  458. SoundEventFolder.Archivable = false
  459. SoundEventFolder.Parent = ReplicatedStorage
  460. end
  461.  
  462. DefaultServerSoundEvent = SoundEventFolder:FindFirstChild(DEFAULT_SERVER_SOUND_EVENT_NAME)
  463. else
  464. DefaultServerSoundEvent = ReplicatedStorage:FindFirstChild(DEFAULT_SERVER_SOUND_EVENT_NAME)
  465. end
  466.  
  467. if not DefaultServerSoundEvent then
  468. if useSoundDispatcher then
  469. DefaultServerSoundEvent = Instance.new("RemoteEvent", SoundEventFolder)
  470. else
  471. DefaultServerSoundEvent = Instance.new("RemoteEvent", ReplicatedStorage)
  472. end
  473.  
  474. DefaultServerSoundEvent.Name = DEFAULT_SERVER_SOUND_EVENT_NAME
  475. DefaultServerSoundEvent.OnServerEvent:Connect(function() end)
  476. end
  477.  
  478. local function CreateNewSound(name, id, looped, pitch, parent)
  479. local sound = Instance.new("Sound")
  480. sound.SoundId = id
  481. sound.Name = name
  482. sound.archivable = false
  483. sound.Pitch = pitch
  484. sound.Looped = looped
  485. sound.MinDistance = 5
  486. sound.MaxDistance = 150
  487. sound.Volume = 0.65
  488. sound.Parent = parent
  489.  
  490. if DefaultServerSoundEvent then
  491. local CharacterSoundEvent = Instance.new("RemoteEvent", sound)
  492. CharacterSoundEvent.Name = "CharacterSoundEvent"
  493. CharacterSoundEvent.OnServerEvent:Connect(function(player, playing, resetPosition)
  494. if type(playing) ~= "boolean" then
  495. return
  496. end
  497. if type(resetPosition) ~= "boolean" then
  498. return
  499. end
  500.  
  501. if player.Character ~= script.Parent then
  502. return
  503. end
  504. for _, p in pairs(Players:GetPlayers()) do
  505. if p ~= player then
  506. -- Connect to the dispatcher to check if the player has loaded.
  507. if useSoundDispatcher then
  508. SoundEventFolder:FindFirstChild("SoundDispatcher"):Fire(p, sound, playing, resetPosition)
  509. else
  510. DefaultServerSoundEvent:FireClient(p, sound, playing, resetPosition)
  511. end
  512. end
  513. end
  514. end)
  515. end
  516. return sound
  517. end
  518.  
  519. local head = script.Parent:FindFirstChild("Head")
  520. if not head then
  521. error("Sound script parent has no child Head.")
  522. return
  523. end
  524.  
  525. CreateNewSound("GettingUp", "rbxasset://sounds/action_get_up.mp3", false, 1, head)
  526. CreateNewSound("Died", "rbxasset://sounds/uuhhh.mp3", false, 1, head)
  527. CreateNewSound("FreeFalling", "rbxasset://sounds/action_falling.mp3", true, 1, head)
  528. CreateNewSound("Jumping", "rbxasset://sounds/action_jump.mp3", false, 1, head)
  529. CreateNewSound("Landing", "rbxasset://sounds/action_jump_land.mp3", false, 1, head)
  530. CreateNewSound("Splash", "rbxasset://sounds/impact_water.mp3", false, 1, head)
  531. CreateNewSound("Running", "rbxasset://sounds/action_footsteps_plastic.mp3", true, 1.85, head)
  532. CreateNewSound("Swimming", "rbxasset://sounds/action_swim.mp3", true, 1.6, head)
  533. CreateNewSound("Climbing", "rbxasset://sounds/action_footsteps_plastic.mp3", true, 1, head)
  534. end))
  535. LocalScript47.Name = "LocalSound"
  536. LocalScript47.Parent = Script46
  537. table.insert(cors,sandbox(LocalScript47,function()
  538. --[[
  539. Author: @spotco
  540. This script runs locally for the player of the given humanoid.
  541. This script triggers humanoid sound play/pause actions locally.
  542.  
  543. The Playing/TimePosition properties of Sound objects bypass FilteringEnabled, so this triggers the sound
  544. immediately for the player and is replicated to all other players.
  545.  
  546. This script is optimized to reduce network traffic through minimizing the amount of property replication.
  547. ]]--
  548.  
  549. --All sounds are referenced by this ID
  550. local SFX = {
  551. Died = 0;
  552. Running = 1;
  553. Swimming = 2;
  554. Climbing = 3,
  555. Jumping = 4;
  556. GettingUp = 5;
  557. FreeFalling = 6;
  558. FallingDown = 7;
  559. Landing = 8;
  560. Splash = 9;
  561. }
  562.  
  563. local useUpdatedLocalSoundFlag = UserSettings():IsUserFeatureEnabled("UserFixCharacterSoundIssues")
  564.  
  565. local Humanoid = nil
  566. local Head = nil
  567. --SFX ID to Sound object
  568. local Sounds = {}
  569. local SoundService = game:GetService("SoundService")
  570. local soundEventFolderName = "DefaultSoundEvents"
  571. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  572. local AddCharacterLoadedEvent = nil
  573. local RemoveCharacterEvent = nil
  574. local soundEventFolder = ReplicatedStorage:FindFirstChild(soundEventFolderName)
  575. local useSoundDispatcher = UserSettings():IsUserFeatureEnabled("UserUseSoundDispatcher")
  576.  
  577. if useSoundDispatcher then
  578. if not soundEventFolder then
  579. soundEventFolder = Instance.new("Folder", ReplicatedStorage)
  580. soundEventFolder.Name = soundEventFolderName
  581. soundEventFolder.Archivable = false
  582. end
  583.  
  584. -- Load the RemoveCharacterEvent
  585. RemoveCharacterEvent = soundEventFolder:FindFirstChild("RemoveCharacterEvent")
  586. if RemoveCharacterEvent == nil then
  587. RemoveCharacterEvent = Instance.new("RemoteEvent", soundEventFolder)
  588. RemoveCharacterEvent.Name = "RemoveCharacterEvent"
  589. end
  590.  
  591. AddCharacterLoadedEvent = soundEventFolder:FindFirstChild("AddCharacterLoadedEvent")
  592. if AddCharacterLoadedEvent == nil then
  593. AddCharacterLoadedEvent = Instance.new("RemoteEvent", soundEventFolder)
  594. AddCharacterLoadedEvent.Name = "AddCharacterLoadedEvent"
  595. end
  596.  
  597. -- Notify the server a new character has been loaded
  598. AddCharacterLoadedEvent:FireServer()
  599.  
  600. -- Notify the sound dispatcher this character has left.
  601. game.Players.LocalPlayer.CharacterRemoving:connect(function(character)
  602. RemoveCharacterEvent:FireServer(game.Players.LocalPlayer)
  603. end)
  604. end
  605.  
  606. do
  607. local Figure = script.Parent.Parent
  608. Head = Figure:WaitForChild("Head")
  609. while not Humanoid do
  610. for _,NewHumanoid in pairs(Figure:GetChildren()) do
  611. if NewHumanoid:IsA("Humanoid") then
  612. Humanoid = NewHumanoid
  613. break
  614. end
  615. end
  616. if Humanoid then break end
  617. Figure.ChildAdded:wait()
  618. end
  619. Sounds[SFX.Died] = Head:WaitForChild("Died")
  620. Sounds[SFX.Running] = Head:WaitForChild("Running")
  621. Sounds[SFX.Swimming] = Head:WaitForChild("Swimming")
  622. Sounds[SFX.Climbing] = Head:WaitForChild("Climbing")
  623. Sounds[SFX.Jumping] = Head:WaitForChild("Jumping")
  624. Sounds[SFX.GettingUp] = Head:WaitForChild("GettingUp")
  625. Sounds[SFX.FreeFalling] = Head:WaitForChild("FreeFalling")
  626. Sounds[SFX.Landing] = Head:WaitForChild("Landing")
  627. Sounds[SFX.Splash] = Head:WaitForChild("Splash")
  628.  
  629. local DefaultServerSoundEvent = nil
  630. if useSoundDispatcher then
  631. DefaultServerSoundEvent = soundEventFolder:FindFirstChild("DefaultServerSoundEvent")
  632. else
  633. DefaultServerSoundEvent = game:GetService("ReplicatedStorage"):FindFirstChild("DefaultServerSoundEvent")
  634. end
  635.  
  636. if DefaultServerSoundEvent then
  637. DefaultServerSoundEvent.OnClientEvent:connect(function(sound, playing, resetPosition)
  638. if UserSettings():IsUserFeatureEnabled("UserPlayCharacterLoopSoundWhenFE") then
  639. if resetPosition and sound.TimePosition ~= 0 then
  640. sound.TimePosition = 0
  641. end
  642. if sound.IsPlaying ~= playing then
  643. sound.Playing = playing
  644. end
  645. else
  646. if sound.TimePosition ~= 0 then
  647. sound.TimePosition = 0
  648. end
  649. if not sound.IsPlaying then
  650. sound.Playing = true
  651. end
  652. end
  653. end)
  654. end
  655. end
  656.  
  657. local IsSoundFilteringEnabled = function()
  658. return game.Workspace.FilteringEnabled and SoundService.RespectFilteringEnabled
  659. end
  660.  
  661. local Util
  662. Util = {
  663.  
  664. --Define linear relationship between (pt1x,pt2x) and (pt2x,pt2y). Evaluate this at x.
  665. YForLineGivenXAndTwoPts = function(x,pt1x,pt1y,pt2x,pt2y)
  666. --(y - y1)/(x - x1) = m
  667. local m = (pt1y - pt2y) / (pt1x - pt2x)
  668. --float b = pt1.y - m * pt1.x;
  669. local b = (pt1y - m * pt1x)
  670. return m * x + b
  671. end;
  672.  
  673. --Clamps the value of "val" between the "min" and "max"
  674. Clamp = function(val,min,max)
  675. return math.min(max,math.max(min,val))
  676. end;
  677.  
  678. --Gets the horizontal (x,z) velocity magnitude of the given part
  679. HorizontalSpeed = function(Head)
  680. local hVel = Head.Velocity + Vector3.new(0,-Head.Velocity.Y,0)
  681. return hVel.magnitude
  682. end;
  683.  
  684. --Gets the vertical (y) velocity magnitude of the given part
  685. VerticalSpeed = function(Head)
  686. return math.abs(Head.Velocity.Y)
  687. end;
  688.  
  689. --Setting Playing/TimePosition values directly result in less network traffic than Play/Pause/Resume/Stop
  690. --If these properties are enabled, use them.
  691. Play = function(sound)
  692. if IsSoundFilteringEnabled() then
  693. sound.CharacterSoundEvent:FireServer(true, true)
  694. end
  695. if sound.TimePosition ~= 0 then
  696. sound.TimePosition = 0
  697. end
  698. if not sound.IsPlaying then
  699. sound.Playing = true
  700. end
  701. end;
  702.  
  703. Pause = function(sound)
  704. if UserSettings():IsUserFeatureEnabled("UserPlayCharacterLoopSoundWhenFE") and IsSoundFilteringEnabled() then
  705. sound.CharacterSoundEvent:FireServer(false, false)
  706. end
  707. if sound.IsPlaying then
  708. sound.Playing = false
  709. end
  710. end;
  711.  
  712. Resume = function(sound)
  713. if UserSettings():IsUserFeatureEnabled("UserPlayCharacterLoopSoundWhenFE") and IsSoundFilteringEnabled() then
  714. sound.CharacterSoundEvent:FireServer(true, false)
  715. end
  716. if not sound.IsPlaying then
  717. sound.Playing = true
  718. end
  719. end;
  720.  
  721. Stop = function(sound)
  722. if UserSettings():IsUserFeatureEnabled("UserPlayCharacterLoopSoundWhenFE") and IsSoundFilteringEnabled() then
  723. sound.CharacterSoundEvent:FireServer(false, true)
  724. end
  725. if sound.IsPlaying then
  726. sound.Playing = false
  727. end
  728. if sound.TimePosition ~= 0 then
  729. sound.TimePosition = 0
  730. end
  731. end;
  732. }
  733.  
  734. do
  735. -- List of all active Looped sounds
  736. local playingLoopedSounds = {}
  737.  
  738. -- Last seen Enum.HumanoidStateType
  739. local activeState = nil
  740.  
  741. local fallSpeed = 0
  742.  
  743. -- Verify and set that "sound" is in "playingLoopedSounds".
  744. function setSoundInPlayingLoopedSounds(sound)
  745. for i=1, #playingLoopedSounds do
  746. if playingLoopedSounds[i] == sound then
  747. return
  748. end
  749. end
  750. table.insert(playingLoopedSounds,sound)
  751. end
  752.  
  753. -- Stop all active looped sounds except parameter "except". If "except" is not passed, all looped sounds will be stopped.
  754. function stopPlayingLoopedSoundsExcept(except)
  755. for i=#playingLoopedSounds,1,-1 do
  756. if playingLoopedSounds[i] ~= except then
  757. Util.Pause(playingLoopedSounds[i])
  758. table.remove(playingLoopedSounds,i)
  759. end
  760. end
  761. end
  762.  
  763. -- Table of Enum.HumanoidStateType to handling function
  764. local stateUpdateHandler = {
  765. [Enum.HumanoidStateType.Dead] = function()
  766. stopPlayingLoopedSoundsExcept()
  767. local sound = Sounds[SFX.Died]
  768. Util.Play(sound)
  769. end;
  770.  
  771. [Enum.HumanoidStateType.RunningNoPhysics] = function(speed)
  772. stateUpdated(Enum.HumanoidStateType.Running, speed)
  773. end;
  774.  
  775. [Enum.HumanoidStateType.Running] = function(speed)
  776. local sound = Sounds[SFX.Running]
  777. stopPlayingLoopedSoundsExcept(sound)
  778.  
  779. if(useUpdatedLocalSoundFlag and activeState == Enum.HumanoidStateType.Freefall and fallSpeed > 0.1) then
  780. -- Play a landing sound if the character dropped from a large distance
  781. local vol = math.min(1.0, math.max(0.0, (fallSpeed - 50) / 110))
  782. local freeFallSound = Sounds[SFX.FreeFalling]
  783. freeFallSound.Volume = vol
  784. Util.Play(freeFallSound)
  785. fallSpeed = 0
  786. end
  787. if useUpdatedLocalSoundFlag then
  788. if speed ~= nil and speed > 0.5 then
  789. Util.Resume(sound)
  790. setSoundInPlayingLoopedSounds(sound)
  791. elseif speed ~= nil then
  792. stopPlayingLoopedSoundsExcept()
  793. end
  794. else
  795. if Util.HorizontalSpeed(Head) > 0.5 then
  796. Util.Resume(sound)
  797. setSoundInPlayingLoopedSounds(sound)
  798. else
  799. stopPlayingLoopedSoundsExcept()
  800. end
  801. end
  802. end;
  803.  
  804. [Enum.HumanoidStateType.Swimming] = function(speed)
  805. local threshold
  806. if useUpdatedLocalSoundFlag then threshold = speed else threshold = Util.VerticalSpeed(Head) end
  807. if activeState ~= Enum.HumanoidStateType.Swimming and threshold > 0.1 then
  808. local splashSound = Sounds[SFX.Splash]
  809. splashSound.Volume = Util.Clamp(
  810. Util.YForLineGivenXAndTwoPts(
  811. Util.VerticalSpeed(Head),
  812. 100, 0.28,
  813. 350, 1),
  814. 0,1)
  815. Util.Play(splashSound)
  816. end
  817.  
  818. do
  819. local sound = Sounds[SFX.Swimming]
  820. stopPlayingLoopedSoundsExcept(sound)
  821. Util.Resume(sound)
  822. setSoundInPlayingLoopedSounds(sound)
  823. end
  824. end;
  825.  
  826. [Enum.HumanoidStateType.Climbing] = function(speed)
  827. local sound = Sounds[SFX.Climbing]
  828. if useUpdatedLocalSoundFlag then
  829. if speed ~= nil and math.abs(speed) > 0.1 then
  830. Util.Resume(sound)
  831. stopPlayingLoopedSoundsExcept(sound)
  832. else
  833. Util.Pause(sound)
  834. stopPlayingLoopedSoundsExcept(sound)
  835. end
  836. else
  837. if Util.VerticalSpeed(Head) > 0.1 then
  838. Util.Resume(sound)
  839. stopPlayingLoopedSoundsExcept(sound)
  840. else
  841. stopPlayingLoopedSoundsExcept()
  842. end
  843. end
  844.  
  845. setSoundInPlayingLoopedSounds(sound)
  846. end;
  847.  
  848. [Enum.HumanoidStateType.Jumping] = function()
  849. if activeState == Enum.HumanoidStateType.Jumping then
  850. return
  851. end
  852. stopPlayingLoopedSoundsExcept()
  853. local sound = Sounds[SFX.Jumping]
  854. Util.Play(sound)
  855. end;
  856.  
  857. [Enum.HumanoidStateType.GettingUp] = function()
  858. stopPlayingLoopedSoundsExcept()
  859. local sound = Sounds[SFX.GettingUp]
  860. Util.Play(sound)
  861. end;
  862.  
  863. [Enum.HumanoidStateType.Freefall] = function()
  864. if activeState == Enum.HumanoidStateType.Freefall then
  865. return
  866. end
  867. local sound = Sounds[SFX.FreeFalling]
  868. sound.Volume = 0
  869. stopPlayingLoopedSoundsExcept()
  870.  
  871. fallSpeed = math.max(fallSpeed, math.abs(Head.Velocity.y))
  872. end;
  873.  
  874. [Enum.HumanoidStateType.FallingDown] = function()
  875. stopPlayingLoopedSoundsExcept()
  876. end;
  877.  
  878. [Enum.HumanoidStateType.Landed] = function()
  879. stopPlayingLoopedSoundsExcept()
  880. if Util.VerticalSpeed(Head) > 75 then
  881. local landingSound = Sounds[SFX.Landing]
  882. landingSound.Volume = Util.Clamp(
  883. Util.YForLineGivenXAndTwoPts(
  884. Util.VerticalSpeed(Head),
  885. 50, 0,
  886. 100, 1),
  887. 0,1)
  888. Util.Play(landingSound)
  889. end
  890. end;
  891.  
  892. [Enum.HumanoidStateType.Seated] = function()
  893. stopPlayingLoopedSoundsExcept()
  894. end;
  895. }
  896.  
  897.  
  898.  
  899. -- Handle state event fired or OnChange fired
  900. function stateUpdated(state, speed)
  901. if stateUpdateHandler[state] ~= nil then
  902. if useUpdatedLocalSoundFlag and (state == Enum.HumanoidStateType.Running
  903. or state == Enum.HumanoidStateType.Climbing
  904. or state == Enum.HumanoidStateType.Swimming
  905. or state == Enum.HumanoidStateType.RunningNoPhysics) then
  906. stateUpdateHandler[state](speed)
  907. else
  908. stateUpdateHandler[state]()
  909. end
  910. end
  911. activeState = state
  912. end
  913.  
  914. Humanoid.Died:connect( function() stateUpdated(Enum.HumanoidStateType.Dead) end)
  915. Humanoid.Running:connect( function(speed) stateUpdated(Enum.HumanoidStateType.Running, speed) end)
  916. Humanoid.Swimming:connect( function(speed) stateUpdated(Enum.HumanoidStateType.Swimming, speed) end)
  917. Humanoid.Climbing:connect( function(speed) stateUpdated(Enum.HumanoidStateType.Climbing, speed) end)
  918. Humanoid.Jumping:connect( function() stateUpdated(Enum.HumanoidStateType.Jumping) end)
  919. Humanoid.GettingUp:connect( function() stateUpdated(Enum.HumanoidStateType.GettingUp) end)
  920. Humanoid.FreeFalling:connect( function() stateUpdated(Enum.HumanoidStateType.Freefall) end)
  921. Humanoid.FallingDown:connect( function() stateUpdated(Enum.HumanoidStateType.FallingDown) end)
  922.  
  923.  
  924.  
  925. -- required for proper handling of Landed event
  926.  
  927. Humanoid.StateChanged:connect(function(old, new)
  928. stateUpdated(new)
  929. end)
  930.  
  931.  
  932.  
  933. function onUpdate(stepDeltaSeconds, tickSpeedSeconds)
  934. local stepScale = stepDeltaSeconds / tickSpeedSeconds
  935. do
  936. local sound = Sounds[SFX.FreeFalling]
  937. if activeState == Enum.HumanoidStateType.Freefall then
  938. if Head.Velocity.Y < 0 and Util.VerticalSpeed(Head) > 75 then
  939. Util.Resume(sound)
  940.  
  941. --Volume takes 1.1 seconds to go from volume 0 to 1
  942. local ANIMATION_LENGTH_SECONDS = 1.1
  943.  
  944. local normalizedIncrement = tickSpeedSeconds / ANIMATION_LENGTH_SECONDS
  945. sound.Volume = Util.Clamp(sound.Volume + normalizedIncrement * stepScale, 0, 1)
  946. else
  947. sound.Volume = 0
  948. end
  949. else
  950. Util.Pause(sound)
  951. end
  952. end
  953.  
  954. do
  955. local sound = Sounds[SFX.Running]
  956. if activeState == Enum.HumanoidStateType.Running then
  957. if Util.HorizontalSpeed(Head) < 0.5 then
  958. Util.Pause(sound)
  959. end
  960. end
  961. end
  962. end
  963.  
  964.  
  965. local lastTick = tick()
  966. local TICK_SPEED_SECONDS = 0.25
  967. while true do
  968. onUpdate(tick() - lastTick,TICK_SPEED_SECONDS)
  969. lastTick = tick()
  970. wait(TICK_SPEED_SECONDS)
  971. end
  972.  
  973. end
  974.  
  975. end))
  976. Script48.Name = "Health"
  977. Script48.Parent = Model0
  978. table.insert(cors,sandbox(Script48,function()
  979. -- Gradually regenerates the Humanoid's Health over time.
  980.  
  981. local REGEN_RATE = 1/100 -- Regenerate this fraction of MaxHealth per second.
  982. local REGEN_STEP = 1 -- Wait this long between each regeneration step.
  983.  
  984. --------------------------------------------------------------------------------
  985.  
  986. local Character = script.Parent
  987. local Humanoid = Character:WaitForChild'Humanoid'
  988.  
  989. --------------------------------------------------------------------------------
  990.  
  991. while true do
  992. while Humanoid.Health < Humanoid.MaxHealth do
  993. local dt = wait(REGEN_STEP)
  994. local dh = dt*REGEN_RATE*Humanoid.MaxHealth
  995. Humanoid.Health = math.min(Humanoid.Health + dh, Humanoid.MaxHealth)
  996. end
  997. Humanoid.HealthChanged:Wait()
  998. end
  999. end))
  1000. Accessory49.Name = "HappyMask"
  1001. Accessory49.Parent = Model0
  1002. Accessory49.AttachmentPoint = CFrame.new(0, 0.5, 0.600000024, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1003. Accessory49.AttachmentPos = Vector3.new(0, 0.5, 0.600000024)
  1004. Part50.Name = "Handle"
  1005. Part50.Parent = Accessory49
  1006. Part50.CFrame = CFrame.new(-10.9200058, 4.50000095, 77.6302795, 1, -7.87137555e-09, 0, 7.87137555e-09, 1, 4.1444221e-16, -3.26223034e-24, -4.1444221e-16, 1)
  1007. Part50.Position = Vector3.new(-10.9200058, 4.50000095, 77.6302795)
  1008. Part50.Size = Vector3.new(1, 1, 1)
  1009. Part50.BottomSurface = Enum.SurfaceType.Smooth
  1010. Part50.CanCollide = false
  1011. Part50.TopSurface = Enum.SurfaceType.Smooth
  1012. Part50.FormFactor = Enum.FormFactor.Symmetric
  1013. Part50.formFactor = Enum.FormFactor.Symmetric
  1014. SpecialMesh51.Parent = Part50
  1015. SpecialMesh51.MeshId = "http://www.roblox.com/asset/?id=13520257"
  1016. SpecialMesh51.Scale = Vector3.new(1.10000002, 1, 1)
  1017. SpecialMesh51.TextureId = "http://www.roblox.com/asset/?id=13520260"
  1018. SpecialMesh51.MeshType = Enum.MeshType.FileMesh
  1019. Vector3Value52.Name = "OriginalSize"
  1020. Vector3Value52.Parent = Part50
  1021. Vector3Value52.Value = Vector3.new(1, 1, 1)
  1022. Weld53.Name = "AccessoryWeld"
  1023. Weld53.Parent = Part50
  1024. Weld53.C0 = CFrame.new(3.93538357e-09, 0, -0.000272274017, 1, 7.87137555e-09, -3.26223034e-24, -7.87137555e-09, 1, -4.1444221e-16, 0, 4.1444221e-16, 1)
  1025. Weld53.C1 = CFrame.new(0, 0, -0.600000024, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1026. Weld53.Part0 = Part50
  1027. Weld53.Part1 = Part1
  1028. Weld53.part1 = Part1
  1029. BodyColors54.Parent = Model0
  1030. BodyColors54.HeadColor = BrickColor.new("Institutional white")
  1031. BodyColors54.HeadColor3 = Color3.new(0.972549, 0.972549, 0.972549)
  1032. BodyColors54.LeftArmColor = BrickColor.new("Institutional white")
  1033. BodyColors54.LeftArmColor3 = Color3.new(0.972549, 0.972549, 0.972549)
  1034. BodyColors54.LeftLegColor = BrickColor.new("Institutional white")
  1035. BodyColors54.LeftLegColor3 = Color3.new(0.972549, 0.972549, 0.972549)
  1036. BodyColors54.RightArmColor = BrickColor.new("Institutional white")
  1037. BodyColors54.RightArmColor3 = Color3.new(0.972549, 0.972549, 0.972549)
  1038. BodyColors54.RightLegColor = BrickColor.new("Institutional white")
  1039. BodyColors54.RightLegColor3 = Color3.new(0.972549, 0.972549, 0.972549)
  1040. BodyColors54.TorsoColor = BrickColor.new("Institutional white")
  1041. BodyColors54.TorsoColor3 = Color3.new(0.972549, 0.972549, 0.972549)
  1042. Accessory55.Name = "Reindeernose"
  1043. Accessory55.Parent = Model0
  1044. Accessory55.AttachmentPoint = CFrame.new(0, 1.79999995, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1045. Accessory55.AttachmentPos = Vector3.new(0, 1.79999995, 0)
  1046. Part56.Name = "Handle"
  1047. Part56.Parent = Accessory55
  1048. Part56.CFrame = CFrame.new(-10.9200058, 4.55000114, 77.480011, 1, -7.87137555e-09, -3.02998127e-15, 7.87137555e-09, 1, 4.14442554e-16, 3.02998127e-15, -4.1444258e-16, 1)
  1049. Part56.Position = Vector3.new(-10.9200058, 4.55000114, 77.480011)
  1050. Part56.Size = Vector3.new(2.31002712, 0.70999819, 1.91000271)
  1051. Part56.BottomSurface = Enum.SurfaceType.Smooth
  1052. Part56.CanCollide = false
  1053. Part56.TopSurface = Enum.SurfaceType.Smooth
  1054. Part56.FormFactor = Enum.FormFactor.Custom
  1055. Part56.formFactor = Enum.FormFactor.Custom
  1056. SpecialMesh57.Parent = Part56
  1057. SpecialMesh57.MeshId = "rbxassetid://1241066615"
  1058. SpecialMesh57.TextureId = "rbxassetid://1241066960"
  1059. SpecialMesh57.MeshType = Enum.MeshType.FileMesh
  1060. Vector3Value58.Name = "OriginalSize"
  1061. Vector3Value58.Parent = Part56
  1062. Vector3Value58.Value = Vector3.new(2.31002712, 0.70999819, 1.91000271)
  1063. Weld59.Name = "AccessoryWeld"
  1064. Weld59.Parent = Part56
  1065. Weld59.C0 = CFrame.new(0, -0.0500000007, 0.75, 1, 7.87137555e-09, 3.02998127e-15, -7.87137555e-09, 1, -4.1444258e-16, -3.02998127e-15, 4.14442554e-16, 1)
  1066. Weld59.Part0 = Part56
  1067. Weld59.Part1 = Part1
  1068. Weld59.part1 = Part1
  1069. Camera60.Name = "ThumbnailCamera"
  1070. Camera60.Parent = Accessory55
  1071. Camera60.CFrame = CFrame.new(-0.85421288, 0.62488544, -1.21589661, -0.793010116, 0.124376744, -0.596376956, -0, 0.978937387, 0.204161227, 0.609208465, 0.161901921, -0.776307225)
  1072. Camera60.CoordinateFrame = CFrame.new(-0.85421288, 0.62488544, -1.21589661, -0.793010116, 0.124376744, -0.596376956, -0, 0.978937387, 0.204161227, 0.609208465, 0.161901921, -0.776307225)
  1073. Camera60.Focus = CFrame.new(0.338540912, 0.216563046, 0.336717606, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1074. Camera60.focus = CFrame.new(0.338540912, 0.216563046, 0.336717606, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1075. Pants61.Name = "Pants"
  1076. Pants61.Parent = Model0
  1077. Pants61.PantsTemplate = "http://www.roblox.com/asset/?id=1319012848"
  1078. ShirtGraphic62.Parent = Model0
  1079. ShirtGraphic62.Graphic = "http://www.roblox.com/asset/?id=1166033059"
  1080. CharacterMesh63.Name = "Slinger Left Arm"
  1081. CharacterMesh63.Parent = Model0
  1082. CharacterMesh63.BodyPart = Enum.BodyPart.LeftArm
  1083. CharacterMesh63.MeshId = 32331863
  1084. CharacterMesh64.Name = "Slinger Left Leg"
  1085. CharacterMesh64.Parent = Model0
  1086. CharacterMesh64.BodyPart = Enum.BodyPart.LeftLeg
  1087. CharacterMesh64.MeshId = 32331927
  1088. Animation65.Name = "Swing"
  1089. Animation65.Parent = Model0
  1090. Animation65.AnimationId = "http://www.roblox.com/Asset?ID=89134792"
  1091. Accessory66.Name = "Clown"
  1092. Accessory66.Parent = Model0
  1093. Accessory66.AttachmentPoint = CFrame.new(0, 0.649999976, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1094. Accessory66.AttachmentPos = Vector3.new(0, 0.649999976, 0)
  1095. Part67.Name = "Handle"
  1096. Part67.Parent = Accessory66
  1097. Part67.CFrame = CFrame.new(-10.9200058, 4.35000086, 78.230011, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1098. Part67.Position = Vector3.new(-10.9200058, 4.35000086, 78.230011)
  1099. Part67.Size = Vector3.new(2, 2, 2)
  1100. Part67.BottomSurface = Enum.SurfaceType.Smooth
  1101. Part67.CanCollide = false
  1102. Part67.TopSurface = Enum.SurfaceType.Smooth
  1103. Part67.FormFactor = Enum.FormFactor.Symmetric
  1104. Part67.formFactor = Enum.FormFactor.Symmetric
  1105. SpecialMesh68.Parent = Part67
  1106. SpecialMesh68.MeshId = "http://www.roblox.com/asset/?id=15393031"
  1107. SpecialMesh68.TextureId = "http://www.roblox.com/asset/?id=15393013"
  1108. SpecialMesh68.MeshType = Enum.MeshType.FileMesh
  1109. Vector3Value69.Name = "OriginalSize"
  1110. Vector3Value69.Parent = Part67
  1111. Vector3Value69.Value = Vector3.new(2, 2, 2)
  1112. Shirt70.Name = "Shirt"
  1113. Shirt70.Parent = Model0
  1114. Shirt70.ShirtTemplate = "http://www.roblox.com/asset/?id=1187657282"
  1115. CharacterMesh71.Name = "Slinger Right Arm"
  1116. CharacterMesh71.Parent = Model0
  1117. CharacterMesh71.BodyPart = Enum.BodyPart.RightArm
  1118. CharacterMesh71.MeshId = 32331968
  1119. CharacterMesh72.Name = "Slinger Torso"
  1120. CharacterMesh72.Parent = Model0
  1121. CharacterMesh72.BodyPart = Enum.BodyPart.Torso
  1122. CharacterMesh72.MeshId = 32332055
  1123. Script73.Name = "AnimateSauce"
  1124. Script73.Parent = Model0
  1125. table.insert(cors,sandbox(Script73,function()
  1126. function waitForChild(parent, childName)
  1127. local child = parent:findFirstChild(childName)
  1128. if child then return child end
  1129. while true do
  1130. child = parent.ChildAdded:wait()
  1131. if child.Name==childName then return child end
  1132. end
  1133. end
  1134. local Figure = script.Parent
  1135. local Torso = waitForChild(Figure, "Torso")
  1136. local RightShoulder = waitForChild(Torso, "Right Shoulder")
  1137. local LeftShoulder = waitForChild(Torso, "Left Shoulder")
  1138. local RightHip = waitForChild(Torso, "Right Hip")
  1139. local LeftHip = waitForChild(Torso, "Left Hip")
  1140. local Neck = waitForChild(Torso, "Neck")
  1141. local Humanoid;
  1142. for _,Child in pairs(Figure:GetChildren())do
  1143. if Child and Child.ClassName=="Humanoid"then
  1144. Humanoid=Child;
  1145. end;
  1146. end;
  1147. local pose = "Standing"
  1148. local currentAnim = ""
  1149. local currentAnimInstance = nil
  1150. local currentAnimTrack = nil
  1151. local currentAnimKeyframeHandler = nil
  1152. local currentAnimSpeed = 1.0
  1153. local animTable = {}
  1154. local animNames = {
  1155. idle = {
  1156. { id = "http://www.roblox.com/asset/?id=180435571", weight = 9 },
  1157. { id = "http://www.roblox.com/asset/?id=180435792", weight = 1 }
  1158. },
  1159. walk = {
  1160. { id = "http://www.roblox.com/asset/?id=180426354", weight = 10 }
  1161. },
  1162. run = {
  1163. { id = "http://www.roblox.com/asset/?id=252557606", weight = 20 }
  1164. },
  1165. jump = {
  1166. { id = "http://www.roblox.com/asset/?id=125750702", weight = 10 }
  1167. },
  1168. fall = {
  1169. { id = "http://www.roblox.com/asset/?id=180436148", weight = 10 }
  1170. },
  1171. climb = {
  1172. { id = "http://www.roblox.com/asset/?id=180436334", weight = 10 }
  1173. },
  1174. sit = {
  1175. { id = "http://www.roblox.com/asset/?id=178130996", weight = 10 }
  1176. },
  1177. toolnone = {
  1178. { id = "http://www.roblox.com/asset/?id=182393478", weight = 10 }
  1179. },
  1180. toolslash = {
  1181. { id = "http://www.roblox.com/asset/?id=129967390", weight = 10 }
  1182. --{ id = "slash.xml", weight = 10 }
  1183. },
  1184. toollunge = {
  1185. { id = "http://www.roblox.com/asset/?id=129967478", weight = 10 }
  1186. },
  1187. wave = {
  1188. { id = "http://www.roblox.com/asset/?id=128777973", weight = 10 }
  1189. },
  1190. point = {
  1191. { id = "http://www.roblox.com/asset/?id=128853357", weight = 10 }
  1192. },
  1193. dance1 = {
  1194. { id = "http://www.roblox.com/asset/?id=182435998", weight = 10 },
  1195. { id = "http://www.roblox.com/asset/?id=182491037", weight = 10 },
  1196. { id = "http://www.roblox.com/asset/?id=182491065", weight = 10 }
  1197. },
  1198. dance2 = {
  1199. { id = "http://www.roblox.com/asset/?id=182436842", weight = 10 },
  1200. { id = "http://www.roblox.com/asset/?id=182491248", weight = 10 },
  1201. { id = "http://www.roblox.com/asset/?id=182491277", weight = 10 }
  1202. },
  1203. dance3 = {
  1204. { id = "http://www.roblox.com/asset/?id=182436935", weight = 10 },
  1205. { id = "http://www.roblox.com/asset/?id=182491368", weight = 10 },
  1206. { id = "http://www.roblox.com/asset/?id=182491423", weight = 10 }
  1207. },
  1208. laugh = {
  1209. { id = "http://www.roblox.com/asset/?id=129423131", weight = 10 }
  1210. },
  1211. cheer = {
  1212. { id = "http://www.roblox.com/asset/?id=129423030", weight = 10 }
  1213. },
  1214. }
  1215. local dances = {"dance1", "dance2", "dance3"}
  1216.  
  1217. -- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
  1218. local emoteNames = { wave = false, point = false, dance1 = true, dance2 = true, dance3 = true, laugh = false, cheer = false}
  1219.  
  1220. function configureAnimationSet(name, fileList)
  1221. if (animTable[name] ~= nil) then
  1222. for _, connection in pairs(animTable[name].connections) do
  1223. connection:disconnect()
  1224. end
  1225. end
  1226. animTable[name] = {}
  1227. animTable[name].count = 0
  1228. animTable[name].totalWeight = 0
  1229. animTable[name].connections = {}
  1230.  
  1231. -- check for config values
  1232. local config = script:FindFirstChild(name)
  1233. if (config ~= nil) then
  1234. --print("Loading anims " .. name)
  1235. table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
  1236. table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
  1237. local idx = 1
  1238. for _, childPart in pairs(config:GetChildren()) do
  1239. if (childPart:IsA("Animation")) then
  1240. table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
  1241. animTable[name][idx] = {}
  1242. animTable[name][idx].anim = childPart
  1243. local weightObject = childPart:FindFirstChild("Weight")
  1244. if (weightObject == nil) then
  1245. animTable[name][idx].weight = 1
  1246. else
  1247. animTable[name][idx].weight = weightObject.Value
  1248. end
  1249. animTable[name].count = animTable[name].count + 1
  1250. animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
  1251. --print(name .. " [" .. idx .. "] " .. animTable[name][idx].anim.AnimationId .. " (" .. animTable[name][idx].weight .. ")")
  1252. idx = idx + 1
  1253. end
  1254. end
  1255. end
  1256.  
  1257. -- fallback to defaults
  1258. if (animTable[name].count <= 0) then
  1259. for idx, anim in pairs(fileList) do
  1260. animTable[name][idx] = {}
  1261. animTable[name][idx].anim = Instance.new("Animation")
  1262. animTable[name][idx].anim.Name = name
  1263. animTable[name][idx].anim.AnimationId = anim.id
  1264. animTable[name][idx].weight = anim.weight
  1265. animTable[name].count = animTable[name].count + 1
  1266. animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
  1267. --print(name .. " [" .. idx .. "] " .. anim.id .. " (" .. anim.weight .. ")")
  1268. end
  1269. end
  1270. end
  1271.  
  1272. -- Setup animation objects
  1273. function scriptChildModified(child)
  1274. local fileList = animNames[child.Name]
  1275. if (fileList ~= nil) then
  1276. configureAnimationSet(child.Name, fileList)
  1277. end
  1278. end
  1279.  
  1280. script.ChildAdded:connect(scriptChildModified)
  1281. script.ChildRemoved:connect(scriptChildModified)
  1282.  
  1283.  
  1284. for name, fileList in pairs(animNames) do
  1285. configureAnimationSet(name, fileList)
  1286. end
  1287.  
  1288. -- ANIMATION
  1289.  
  1290. -- declarations
  1291. local toolAnim = "None"
  1292. local toolAnimTime = 0
  1293.  
  1294. local jumpAnimTime = 0
  1295. local jumpAnimDuration = 0.3
  1296.  
  1297. local toolTransitionTime = 0.1
  1298. local fallTransitionTime = 0.3
  1299. local jumpMaxLimbVelocity = 0.75
  1300.  
  1301. -- functions
  1302.  
  1303. function stopAllAnimations()
  1304. local oldAnim = currentAnim
  1305.  
  1306. -- return to idle if finishing an emote
  1307. if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
  1308. oldAnim = "idle"
  1309. end
  1310.  
  1311. currentAnim = ""
  1312. currentAnimInstance = nil
  1313. if (currentAnimKeyframeHandler ~= nil) then
  1314. currentAnimKeyframeHandler:disconnect()
  1315. end
  1316.  
  1317. if (currentAnimTrack ~= nil) then
  1318. currentAnimTrack:Stop()
  1319. currentAnimTrack:Destroy()
  1320. currentAnimTrack = nil
  1321. end
  1322. return oldAnim
  1323. end
  1324.  
  1325. function setAnimationSpeed(speed)
  1326. if speed ~= currentAnimSpeed then
  1327. currentAnimSpeed = speed
  1328. currentAnimTrack:AdjustSpeed(currentAnimSpeed)
  1329. end
  1330. end
  1331.  
  1332. function keyFrameReachedFunc(frameName)
  1333. if (frameName == "End") then
  1334.  
  1335. local repeatAnim = currentAnim
  1336. -- return to idle if finishing an emote
  1337. if (emoteNames[repeatAnim] ~= nil and emoteNames[repeatAnim] == false) then
  1338. repeatAnim = "idle"
  1339. end
  1340.  
  1341. local animSpeed = currentAnimSpeed
  1342. playAnimation(repeatAnim, 0.0, Humanoid)
  1343. setAnimationSpeed(animSpeed)
  1344. end
  1345. end
  1346.  
  1347. -- Preload animations
  1348. function playAnimation(animName, transitionTime, humanoid)
  1349.  
  1350. local roll = math.random(1, animTable[animName].totalWeight)
  1351. local origRoll = roll
  1352. local idx = 1
  1353. while (roll > animTable[animName][idx].weight) do
  1354. roll = roll - animTable[animName][idx].weight
  1355. idx = idx + 1
  1356. end
  1357. --print(animName .. " " .. idx .. " [" .. origRoll .. "]")
  1358. local anim = animTable[animName][idx].anim
  1359. -- switch animation
  1360. if (anim ~= currentAnimInstance) then
  1361. if (currentAnimTrack ~= nil) then
  1362. currentAnimTrack:Stop(transitionTime)
  1363. currentAnimTrack:Destroy()
  1364. end
  1365. currentAnimSpeed = 1.0
  1366. -- load it to the humanoid; get AnimationTrack
  1367. currentAnimTrack = humanoid:LoadAnimation(anim)
  1368. -- play the animation
  1369. currentAnimTrack:Play(transitionTime)
  1370. currentAnim = animName
  1371. currentAnimInstance = anim
  1372. -- set up keyframe name triggers
  1373. if (currentAnimKeyframeHandler ~= nil) then
  1374. currentAnimKeyframeHandler:disconnect()
  1375. end
  1376. currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
  1377. end
  1378. end
  1379. -------------------------------------------------------------------------------------------
  1380. -------------------------------------------------------------------------------------------
  1381. local toolAnimName = ""
  1382. local toolAnimTrack = nil
  1383. local toolAnimInstance = nil
  1384. local currentToolAnimKeyframeHandler = nil
  1385. function toolKeyFrameReachedFunc(frameName)
  1386. if (frameName == "End") then
  1387. --print("Keyframe : ".. frameName)
  1388. playToolAnimation(toolAnimName, 0.0, Humanoid)
  1389. end
  1390. end
  1391. function playToolAnimation(animName, transitionTime, humanoid)
  1392. local roll = math.random(1, animTable[animName].totalWeight)
  1393. local origRoll = roll
  1394. local idx = 1
  1395. while (roll > animTable[animName][idx].weight) do
  1396. roll = roll - animTable[animName][idx].weight
  1397. idx = idx + 1
  1398. end
  1399. --print(animName .. " * " .. idx .. " [" .. origRoll .. "]")
  1400. local anim = animTable[animName][idx].anim
  1401. if (toolAnimInstance ~= anim) then
  1402. if (toolAnimTrack ~= nil) then
  1403. toolAnimTrack:Stop()
  1404. toolAnimTrack:Destroy()
  1405. transitionTime = 0
  1406. end
  1407. -- load it to the humanoid; get AnimationTrack
  1408. toolAnimTrack = humanoid:LoadAnimation(anim)
  1409. -- play the animation
  1410. toolAnimTrack:Play(transitionTime)
  1411. toolAnimName = animName
  1412. toolAnimInstance = anim
  1413. currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc)
  1414. end
  1415. end
  1416. function stopToolAnimations()
  1417. local oldAnim = toolAnimName
  1418. if (currentToolAnimKeyframeHandler ~= nil) then
  1419. currentToolAnimKeyframeHandler:disconnect()
  1420. end
  1421. toolAnimName = ""
  1422. toolAnimInstance = nil
  1423. if (toolAnimTrack ~= nil) then
  1424. toolAnimTrack:Stop()
  1425. toolAnimTrack:Destroy()
  1426. toolAnimTrack = nil
  1427. end
  1428. return oldAnim
  1429. end
  1430. -------------------------------------------------------------------------------------------
  1431. -------------------------------------------------------------------------------------------
  1432. function onRunning(speed)
  1433. if speed>0.01 then
  1434. if Figure and Humanoid and Humanoid.WalkSpeed<17 then
  1435. playAnimation("walk", 0.1, Humanoid);
  1436. elseif Figure and Humanoid and Humanoid.WalkSpeed>17 then
  1437. playAnimation("run", 0.1, Humanoid);
  1438. end;
  1439. if currentAnimInstance and currentAnimInstance.AnimationId == "http://www.roblox.com/asset/?id=180426354" then
  1440. setAnimationSpeed(speed / 14.5)
  1441. end
  1442. pose = "Running"
  1443. else
  1444. playAnimation("idle", 0.1, Humanoid)
  1445. pose = "Standing"
  1446. end
  1447. end
  1448. function onDied()
  1449. pose = "Dead"
  1450. end
  1451. function onJumping()
  1452. playAnimation("jump", 0.1, Humanoid)
  1453. jumpAnimTime = jumpAnimDuration
  1454. pose = "Jumping"
  1455. end
  1456. function onClimbing(speed)
  1457. playAnimation("climb", 0.1, Humanoid)
  1458. setAnimationSpeed(speed / 12.0)
  1459. pose = "Climbing"
  1460. end
  1461. function onGettingUp()
  1462. pose = "GettingUp"
  1463. end
  1464. function onFreeFall()
  1465. if (jumpAnimTime <= 0) then
  1466. playAnimation("fall", fallTransitionTime, Humanoid)
  1467. end
  1468. pose = "FreeFall"
  1469. end
  1470. function onFallingDown()
  1471. pose = "FallingDown"
  1472. end
  1473. function onSeated()
  1474. pose = "Seated"
  1475. end
  1476. function onPlatformStanding()
  1477. pose = "PlatformStanding"
  1478. end
  1479. function onSwimming(speed)
  1480. if speed>0 then
  1481. pose = "Running"
  1482. else
  1483. pose = "Standing"
  1484. end
  1485. end
  1486.  
  1487. function getTool()
  1488. for _, kid in ipairs(Figure:GetChildren()) do
  1489. if kid.className == "Tool" then return kid end
  1490. end
  1491. return nil
  1492. end
  1493.  
  1494. function getToolAnim(tool)
  1495. for _, c in ipairs(tool:GetChildren()) do
  1496. if c.Name == "toolanim" and c.className == "StringValue" then
  1497. return c
  1498. end
  1499. end
  1500. return nil
  1501. end
  1502.  
  1503. function animateTool()
  1504.  
  1505. if (toolAnim == "None") then
  1506. playToolAnimation("toolnone", toolTransitionTime, Humanoid)
  1507. return
  1508. end
  1509.  
  1510. if (toolAnim == "Slash") then
  1511. playToolAnimation("toolslash", 0, Humanoid)
  1512. return
  1513. end
  1514.  
  1515. if (toolAnim == "Lunge") then
  1516. playToolAnimation("toollunge", 0, Humanoid)
  1517. return
  1518. end
  1519. end
  1520.  
  1521. function moveSit()
  1522. RightShoulder.MaxVelocity = 0.15
  1523. LeftShoulder.MaxVelocity = 0.15
  1524. RightShoulder:SetDesiredAngle(3.14 /2)
  1525. LeftShoulder:SetDesiredAngle(-3.14 /2)
  1526. RightHip:SetDesiredAngle(3.14 /2)
  1527. LeftHip:SetDesiredAngle(-3.14 /2)
  1528. end
  1529.  
  1530. local lastTick = 0
  1531.  
  1532. function move(time)
  1533. local amplitude = 1
  1534. local frequency = 1
  1535. local deltaTime = time - lastTick
  1536. lastTick = time
  1537.  
  1538. local climbFudge = 0
  1539. local setAngles = false
  1540.  
  1541. if (jumpAnimTime > 0) then
  1542. jumpAnimTime = jumpAnimTime - deltaTime
  1543. end
  1544.  
  1545. if (pose == "FreeFall" and jumpAnimTime <= 0) then
  1546. playAnimation("fall", fallTransitionTime, Humanoid)
  1547. elseif (pose == "Seated") then
  1548. playAnimation("sit", 0.5, Humanoid)
  1549. return
  1550. elseif (pose == "Running") then
  1551. if Figure and Humanoid and Humanoid.WalkSpeed<17 then
  1552. playAnimation("walk", 0.1, Humanoid);
  1553. elseif Figure and Humanoid and Humanoid.WalkSpeed>17 then
  1554. playAnimation("run", 0.1, Humanoid);
  1555. end;
  1556. elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
  1557. stopAllAnimations()
  1558. amplitude = 0.1
  1559. frequency = 1
  1560. setAngles = true
  1561. end
  1562. if (setAngles) then
  1563. local desiredAngle = amplitude * math.sin(time * frequency)
  1564. RightShoulder:SetDesiredAngle(desiredAngle + climbFudge)
  1565. LeftShoulder:SetDesiredAngle(desiredAngle - climbFudge)
  1566. RightHip:SetDesiredAngle(-desiredAngle)
  1567. LeftHip:SetDesiredAngle(-desiredAngle)
  1568. end
  1569. -- Tool Animation handling
  1570. local tool = getTool()
  1571. if tool and tool:FindFirstChild("Handle") then
  1572. local animStringValueObject = getToolAnim(tool)
  1573. if animStringValueObject then
  1574. toolAnim = animStringValueObject.Value
  1575. -- message recieved, delete StringValue
  1576. animStringValueObject.Parent = nil
  1577. toolAnimTime = time + .3
  1578. end
  1579. if time > toolAnimTime then
  1580. toolAnimTime = 0
  1581. toolAnim = "None"
  1582. end
  1583. animateTool()
  1584. else
  1585. stopToolAnimations()
  1586. toolAnim = "None"
  1587. toolAnimInstance = nil
  1588. toolAnimTime = 0
  1589. end
  1590. end
  1591. -- connect events
  1592. Humanoid.Died:connect(onDied)
  1593. Humanoid.Running:connect(onRunning)
  1594. Humanoid.Jumping:connect(onJumping)
  1595. Humanoid.Climbing:connect(onClimbing)
  1596. Humanoid.GettingUp:connect(onGettingUp)
  1597. Humanoid.FreeFalling:connect(onFreeFall)
  1598. Humanoid.FallingDown:connect(onFallingDown)
  1599. Humanoid.Seated:connect(onSeated)
  1600. Humanoid.PlatformStanding:connect(onPlatformStanding)
  1601. Humanoid.Swimming:connect(onSwimming)
  1602. local runService = game:GetService("RunService");
  1603. playAnimation("idle", 0.1, Humanoid)
  1604. pose = "Standing"
  1605. while Wait(0)do
  1606. local _,time=wait(0)
  1607. move(time)
  1608. end
  1609. end))
  1610. StringValue74.Name = "climb"
  1611. StringValue74.Parent = Script73
  1612. Animation75.Name = "ClimbAnim"
  1613. Animation75.Parent = StringValue74
  1614. Animation75.AnimationId = "http://www.roblox.com/asset/?id=180436334"
  1615. StringValue76.Name = "fall"
  1616. StringValue76.Parent = Script73
  1617. Animation77.Name = "FallAnim"
  1618. Animation77.Parent = StringValue76
  1619. Animation77.AnimationId = "http://www.roblox.com/asset/?id=180436148"
  1620. StringValue78.Name = "idle"
  1621. StringValue78.Parent = Script73
  1622. Animation79.Name = "Animation1"
  1623. Animation79.Parent = StringValue78
  1624. Animation79.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  1625. NumberValue80.Name = "Weight"
  1626. NumberValue80.Parent = Animation79
  1627. NumberValue80.Value = 9
  1628. Animation81.Name = "Animation2"
  1629. Animation81.Parent = StringValue78
  1630. Animation81.AnimationId = "http://www.roblox.com/asset/?id=180435792"
  1631. NumberValue82.Name = "Weight"
  1632. NumberValue82.Parent = Animation81
  1633. NumberValue82.Value = 1
  1634. StringValue83.Name = "jump"
  1635. StringValue83.Parent = Script73
  1636. Animation84.Name = "JumpAnim"
  1637. Animation84.Parent = StringValue83
  1638. Animation84.AnimationId = "http://www.roblox.com/asset/?id=125750702"
  1639. StringValue85.Name = "run"
  1640. StringValue85.Parent = Script73
  1641. Animation86.Name = "RunAnim"
  1642. Animation86.Parent = StringValue85
  1643. Animation86.AnimationId = "http://www.roblox.com/asset/?id=252557606"
  1644. StringValue87.Name = "sit"
  1645. StringValue87.Parent = Script73
  1646. Animation88.Name = "SitAnim"
  1647. Animation88.Parent = StringValue87
  1648. Animation88.AnimationId = "http://www.roblox.com/asset/?id=178130996"
  1649. StringValue89.Name = "toolnone"
  1650. StringValue89.Parent = Script73
  1651. Animation90.Name = "ToolNoneAnim"
  1652. Animation90.Parent = StringValue89
  1653. Animation90.AnimationId = "http://www.roblox.com/asset/?id=182393478"
  1654. StringValue91.Name = "walk"
  1655. StringValue91.Parent = Script73
  1656. Animation92.Name = "WalkAnim"
  1657. Animation92.Parent = StringValue91
  1658. Animation92.AnimationId = "http://www.roblox.com/asset/?id=180426354"
  1659. Script93.Name = "Health"
  1660. Script93.Parent = Model0
  1661. table.insert(cors,sandbox(Script93,function()
  1662. --Responsible for regening a player's humanoid's health
  1663.  
  1664. -- declarations
  1665. local Figure = script.Parent
  1666. local Head = Figure:WaitForChild("Head")
  1667. local Humanoid;
  1668. for _,Child in pairs(Figure:GetChildren())do
  1669. if Child and Child.ClassName=="Humanoid"then
  1670. Humanoid=Child;
  1671. end;
  1672. end;
  1673. local regening = false
  1674.  
  1675. -- regeneration
  1676. function regenHealth()
  1677. if regening then return end
  1678. regening = true
  1679.  
  1680. while Humanoid.Health < Humanoid.MaxHealth do
  1681. local s = wait(1)
  1682. local health = Humanoid.Health
  1683. if health~=0 and health < Humanoid.MaxHealth then
  1684. local newHealthDelta = 0.01 * s * Humanoid.MaxHealth
  1685. health = health + newHealthDelta
  1686. Humanoid.Health = math.min(health,Humanoid.MaxHealth)
  1687. end
  1688. end
  1689.  
  1690. if Humanoid.Health > Humanoid.MaxHealth then
  1691. Humanoid.Health = Humanoid.MaxHealth
  1692. end
  1693.  
  1694. regening = false
  1695. end
  1696.  
  1697. Humanoid.HealthChanged:connect(regenHealth)
  1698.  
  1699. end))
  1700. Script94.Name = "JeffTheKillerMain"
  1701. Script94.Parent = Model0
  1702. table.insert(cors,sandbox(Script94,function()
  1703. --[[ By: Brutez. ]]--
  1704. local JeffTheKillerScript=script;
  1705. repeat Wait(0)until JeffTheKillerScript and JeffTheKillerScript.Parent and JeffTheKillerScript.Parent.ClassName=="Model"and JeffTheKillerScript.Parent:FindFirstChild("Head")and JeffTheKillerScript.Parent:FindFirstChild("Torso");
  1706. local JeffTheKiller=JeffTheKillerScript.Parent;
  1707. function raycast(Spos,vec,currentdist)
  1708. local hit2,pos2=game.Workspace:FindPartOnRay(Ray.new(Spos+(vec*.05),vec*currentdist),JeffTheKiller);
  1709. if hit2~=nil and pos2 then
  1710. if hit2.Name=="Handle" and not hit2.CanCollide or string.sub(hit2.Name,1,6)=="Effect"and not hit2.CanCollide then
  1711. local currentdist=currentdist-(pos2-Spos).magnitude;
  1712. return raycast(pos2,vec,currentdist);
  1713. end;
  1714. end;
  1715. return hit2,pos2;
  1716. end;
  1717. function RayCast(Position,Direction,MaxDistance,IgnoreList)
  1718. return Game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(Position,Direction.unit*(MaxDistance or 999.999)),IgnoreList);
  1719. end;
  1720. --[[if JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Thumbnail")then]]--
  1721. --[[JeffTheKiller:FindFirstChild("Thumbnail"):Destroy();]]--
  1722. --[[end;]]--
  1723. local JeffTheKillerHumanoid;
  1724. for _,Child in pairs(JeffTheKiller:GetChildren())do
  1725. if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
  1726. JeffTheKillerHumanoid=Child;
  1727. end;
  1728. end;
  1729. local AttackDebounce=false;
  1730. local JeffTheKillerKnife=JeffTheKiller:FindFirstChild("Knife");
  1731. local JeffTheKillerHead=JeffTheKiller:FindFirstChild("Head");
  1732. local JeffTheKillerHumanoidRootPart=JeffTheKiller:FindFirstChild("HumanoidRootPart");
  1733. local WalkDebounce=false;
  1734. local Notice=false;
  1735. local JeffLaughDebounce=false;
  1736. local MusicDebounce=false;
  1737. local NoticeDebounce=false;
  1738. local ChosenMusic;
  1739. JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,0,1,0,1,-0);
  1740. local OriginalC0=JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0;
  1741. function FindNearestBae()
  1742. local NoticeDistance=200;
  1743. local TargetMain;
  1744. for _,TargetModel in pairs(Game:GetService("Workspace"):GetChildren())do
  1745. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and TargetModel.className=="Model"and TargetModel~=JeffTheKiller and TargetModel.Name~=JeffTheKiller.Name and TargetModel:FindFirstChild("Torso")and TargetModel:FindFirstChild("Head")then
  1746. local TargetPart=TargetModel:FindFirstChild("Torso");
  1747. local FoundHumanoid;
  1748. for _,Child in pairs(TargetModel:GetChildren())do
  1749. if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
  1750. FoundHumanoid=Child;
  1751. end;
  1752. end;
  1753. if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<NoticeDistance then
  1754. TargetMain=TargetPart;
  1755. NoticeDistance=(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude;
  1756. local hit,pos=raycast(JeffTheKillerHumanoidRootPart.Position,(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).unit,500)
  1757. if hit and hit.Parent and hit.Parent.ClassName=="Model"and hit.Parent:FindFirstChild("Torso")and hit.Parent:FindFirstChild("Head")then
  1758. if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<9 and not AttackDebounce then
  1759. Spawn(function()
  1760. AttackDebounce=true;
  1761. local SwingAnimation=JeffTheKillerHumanoid:LoadAnimation(JeffTheKiller:FindFirstChild("Swing"));
  1762. local SwingChoice=math.random(1,2);
  1763. local HitChoice=math.random(1,3);
  1764. SwingAnimation:Play();
  1765. SwingAnimation:AdjustSpeed(3.5+(math.random()*0.3));
  1766. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Swing")then
  1767. local SwingSound=JeffTheKillerKnife:FindFirstChild("Swing");
  1768. SwingSound.Pitch=1+(math.random()*0.04);
  1769. SwingSound:Play();
  1770. end;
  1771. Wait(0.3);
  1772. if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<8 then
  1773. FoundHumanoid:TakeDamage(35);
  1774. if HitChoice==1 and JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Hit1")then
  1775. local HitSound=JeffTheKillerKnife:FindFirstChild("Hit1");
  1776. HitSound.Pitch=1+(math.random()*0.04);
  1777. HitSound:Play(91154909);
  1778. elseif HitChoice==2 and JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Hit2")then
  1779. local HitSound=JeffTheKillerKnife:FindFirstChild("Hit2");
  1780. HitSound.Pitch=1+(math.random()*0.04);
  1781. HitSound:Play(91154932);
  1782. elseif HitChoice==3 and JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Hit3")then
  1783. local HitSound=JeffTheKillerKnife:FindFirstChild("Hit3");
  1784. HitSound.Pitch=1+(math.random()*0.04);
  1785. HitSound:Play(91154954);
  1786. end;
  1787. end;
  1788. Wait(0.1);
  1789. AttackDebounce=false;
  1790. end);
  1791. end;
  1792. end;
  1793. end;
  1794. end;
  1795. end;
  1796. return TargetMain;
  1797. end;
  1798. while Wait(0)do
  1799. local TargetPoint=JeffTheKillerHumanoid.TargetPoint;
  1800. local Blockage,BlockagePos=RayCast((JeffTheKillerHumanoidRootPart.CFrame+CFrame.new(JeffTheKillerHumanoidRootPart.Position,Vector3.new(TargetPoint.X,JeffTheKillerHumanoidRootPart.Position.Y,TargetPoint.Z)).lookVector*(JeffTheKillerHumanoidRootPart.Size.Z/2)).p,JeffTheKillerHumanoidRootPart.CFrame.lookVector,(JeffTheKillerHumanoidRootPart.Size.Z*2.5),{JeffTheKiller,JeffTheKiller})
  1801. local Jumpable=false;
  1802. if Blockage then
  1803. Jumpable=true;
  1804. if Blockage and Blockage.Parent and Blockage.Parent.ClassName~="Workspace"then
  1805. local BlockageHumanoid;
  1806. for _,Child in pairs(Blockage.Parent:GetChildren())do
  1807. if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
  1808. BlockageHumanoid=Child;
  1809. end;
  1810. end;
  1811. if Blockage and Blockage:IsA("Terrain")then
  1812. local CellPos=Blockage:WorldToCellPreferSolid((BlockagePos-Vector3.new(0,2,0)));
  1813. local CellMaterial,CellShape,CellOrientation=Blockage:GetCell(CellPos.X,CellPos.Y,CellPos.Z);
  1814. if CellMaterial==Enum.CellMaterial.Water then
  1815. Jumpable=false;
  1816. end;
  1817. elseif BlockageHumanoid or Blockage.ClassName=="TrussPart"or Blockage.ClassName=="WedgePart"or Blockage.Name=="Handle"and Blockage.Parent.ClassName=="Hat"or Blockage.Name=="Handle"and Blockage.Parent.ClassName=="Tool"then
  1818. Jumpable=false;
  1819. end;
  1820. end;
  1821. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and not JeffTheKillerHumanoid.Sit and Jumpable then
  1822. JeffTheKillerHumanoid.Jump=true;
  1823. end;
  1824. end;
  1825. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHumanoidRootPart and JeffTheKillerHead:FindFirstChild("Jeff_Step")and (JeffTheKillerHumanoidRootPart.Velocity-Vector3.new(0,JeffTheKillerHumanoidRootPart.Velocity.y,0)).magnitude>=5 and not WalkDebounce and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 then
  1826. Spawn(function()
  1827. WalkDebounce=true;
  1828. local FiredRay=Ray.new(JeffTheKillerHumanoidRootPart.Position,Vector3.new(0,-4,0));
  1829. local RayTarget,endPoint=Game:GetService("Workspace"):FindPartOnRay(FiredRay,JeffTheKiller);
  1830. if RayTarget then
  1831. local JeffTheKillerHeadFootStepClone=JeffTheKillerHead:FindFirstChild("Jeff_Step"):Clone();
  1832. JeffTheKillerHeadFootStepClone.Parent=JeffTheKillerHead;
  1833. JeffTheKillerHeadFootStepClone:Play();
  1834. JeffTheKillerHeadFootStepClone:Destroy();
  1835. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and JeffTheKillerHumanoid.WalkSpeed<17 then
  1836. Wait(0.4);
  1837. elseif JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and JeffTheKillerHumanoid.WalkSpeed>17 then
  1838. Wait(0.15);
  1839. end
  1840. end;
  1841. WalkDebounce=false;
  1842. end);
  1843. end;
  1844. local MainTarget=FindNearestBae();
  1845. local FoundHumanoid;
  1846. if MainTarget then
  1847. for _,Child in pairs(MainTarget.Parent:GetChildren())do
  1848. if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
  1849. FoundHumanoid=Child;
  1850. end;
  1851. end;
  1852. end;
  1853. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and MainTarget.Parent and FoundHumanoid and FoundHumanoid.Jump then
  1854. JeffTheKillerHumanoid.Jump=true;
  1855. end;
  1856. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<25 then
  1857. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")and not JeffTheKillerHead:FindFirstChild("Jeff_Laugh").IsPlaying then
  1858. JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=1;
  1859. JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Play();
  1860. end;
  1861. elseif JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude>25 then
  1862. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")and JeffTheKillerHead:FindFirstChild("Jeff_Laugh").IsPlaying then
  1863. if not JeffLaughDebounce then
  1864. Spawn(function()
  1865. JeffLaughDebounce=true;
  1866. repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")then JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume-0.1;else break;end;until JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume==0 or JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume<0;
  1867. JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=0;
  1868. JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Stop();
  1869. JeffLaughDebounce=false;
  1870. end);
  1871. end;
  1872. end;
  1873. end;
  1874. if not ChosenMusic and JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<50 then
  1875. local MusicChoice=math.random(1,2);
  1876. if MusicChoice==1 and JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Jeff_Scene_Sound1")then
  1877. ChosenMusic=JeffTheKiller:FindFirstChild("Jeff_Scene_Sound1");
  1878. elseif MusicChoice==2 and JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Jeff_Scene_Sound2")then
  1879. ChosenMusic=JeffTheKiller:FindFirstChild("Jeff_Scene_Sound2");
  1880. end;
  1881. if JeffTheKillerScript and JeffTheKiller and ChosenMusic and not ChosenMusic.IsPlaying then
  1882. ChosenMusic.Volume=0.5;
  1883. ChosenMusic:Play();
  1884. end;
  1885. elseif JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude>50 then
  1886. if JeffTheKillerScript and JeffTheKiller and ChosenMusic and ChosenMusic.IsPlaying then
  1887. if not MusicDebounce then
  1888. Spawn(function()
  1889. MusicDebounce=true;
  1890. repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and ChosenMusic then ChosenMusic.Volume=ChosenMusic.Volume-0.01;else break;end;until ChosenMusic.Volume==0 or ChosenMusic.Volume<0;
  1891. if ChosenMusic then
  1892. ChosenMusic.Volume=0;
  1893. ChosenMusic:Stop();
  1894. end;
  1895. ChosenMusic=nil;
  1896. MusicDebounce=false;
  1897. end);
  1898. end;
  1899. end;
  1900. end;
  1901. if not MainTarget and not JeffLaughDebounce then
  1902. Spawn(function()
  1903. JeffLaughDebounce=true;
  1904. repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")then JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume-0.1;else break;end;until JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume==0 or JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume<0;
  1905. JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=0;
  1906. JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Stop();
  1907. JeffLaughDebounce=false;
  1908. end);
  1909. end;
  1910. if not MainTarget and not MusicDebounce then
  1911. Spawn(function()
  1912. MusicDebounce=true;
  1913. repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and ChosenMusic then ChosenMusic.Volume=ChosenMusic.Volume-0.01;else break;end;until ChosenMusic.Volume==0 or ChosenMusic.Volume<0;
  1914. if ChosenMusic then
  1915. ChosenMusic.Volume=0;
  1916. ChosenMusic:Stop();
  1917. end;
  1918. ChosenMusic=nil;
  1919. MusicDebounce=false;
  1920. end);
  1921. end;
  1922. if MainTarget then
  1923. Notice=true;
  1924. if Notice and not NoticeDebounce and JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Susto2")then
  1925. JeffTheKillerHead:FindFirstChild("Jeff_Susto2"):Play(380102473);
  1926. NoticeDebounce=true;
  1927. end
  1928. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 then
  1929. if MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude>5 then
  1930. JeffTheKillerHumanoid.WalkSpeed=40;
  1931. elseif MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<5 then
  1932. JeffTheKillerHumanoid.WalkSpeed=0.004;
  1933. end;
  1934. JeffTheKillerHumanoid:MoveTo(MainTarget.Position+(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).unit*2,Game:GetService("Workspace"):FindFirstChild("Terrain"));
  1935. local NeckRotation=(JeffTheKiller:FindFirstChild("Torso").Position.Y-MainTarget.Parent:FindFirstChild("Head").Position.Y)/10;
  1936. if NeckRotation>-1.5 and NeckRotation<1.5 then
  1937. JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=OriginalC0*CFrame.fromEulerAnglesXYZ(NeckRotation,0,0);
  1938. end;
  1939. if NeckRotation<-1.5 then
  1940. JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,-0.993636549,0.112633869,0,0.112633869,0.993636549);
  1941. elseif NeckRotation>1.5 then
  1942. JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,0.996671617,0.081521146,0,0.081521146,-0.996671617);
  1943. end;
  1944. else
  1945. end;
  1946. else
  1947. Notice=false;
  1948. NoticeDebounce=false;
  1949. JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,0,1,0,1,-0);
  1950. local RandomWalk=math.random(1,150);
  1951. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 then
  1952. JeffTheKillerHumanoid.WalkSpeed=12;
  1953. if RandomWalk==1 then
  1954. JeffTheKillerHumanoid:MoveTo(Game:GetService("Workspace"):FindFirstChild("Terrain").Position+Vector3.new(math.random(-2048,2048),0,math.random(-2048,2048)),Game:GetService("Workspace"):FindFirstChild("Terrain"));
  1955. end;
  1956. end;
  1957. end;
  1958. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid then
  1959. JeffTheKillerHumanoid.DisplayDistanceType="None";
  1960. JeffTheKillerHumanoid.HealthDisplayDistance=0;
  1961. JeffTheKillerHumanoid.Name="ColdBloodedKiller";
  1962. JeffTheKillerHumanoid.NameDisplayDistance=0;
  1963. JeffTheKillerHumanoid.NameOcclusion="EnemyOcclusion";
  1964. JeffTheKillerHumanoid.AutoJumpEnabled=true;
  1965. JeffTheKillerHumanoid.AutoRotate=true;
  1966. JeffTheKillerHumanoid.MaxHealth=700;
  1967. JeffTheKillerHumanoid.JumpPower=60;
  1968. JeffTheKillerHumanoid.MaxSlopeAngle=89.9;
  1969. end;
  1970. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and not JeffTheKillerHumanoid.AutoJumpEnabled then
  1971. JeffTheKillerHumanoid.AutoJumpEnabled=true;
  1972. end;
  1973. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and not JeffTheKillerHumanoid.AutoRotate then
  1974. JeffTheKillerHumanoid.AutoRotate=true;
  1975. end;
  1976. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.PlatformStand then
  1977. JeffTheKillerHumanoid.PlatformStand=false;
  1978. end;
  1979. if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Sit then
  1980. JeffTheKillerHumanoid.Sit=false;
  1981. end;
  1982. end;
  1983. --[[ By: Brutez. ]]--
  1984. end))
  1985. Script95.Name = "Respawn"
  1986. Script95.Parent = Model0
  1987. table.insert(cors,sandbox(Script95,function()
  1988. --[[ By: Brutez, 2/28/2015, 1:34 AM, (UTC-08:00) Pacific Time (US & Canada) ]]--
  1989. local PlayerSpawning=false; --[[ Change this to true if you want the NPC to spawn like a player, and change this to false if you want the NPC to spawn at it's current position. ]]--
  1990. local AdvancedRespawnScript=script;
  1991. repeat Wait(0)until script and script.Parent and script.Parent.ClassName=="Model";
  1992. local JeffTheKiller=AdvancedRespawnScript.Parent;
  1993. if AdvancedRespawnScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Thumbnail")then
  1994. JeffTheKiller:FindFirstChild("Thumbnail"):Destroy();
  1995. end;
  1996. local GameDerbis=Game:GetService("Debris");
  1997. local JeffTheKillerHumanoid;
  1998. for _,Child in pairs(JeffTheKiller:GetChildren())do
  1999. if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
  2000. JeffTheKillerHumanoid=Child;
  2001. end;
  2002. end;
  2003. local Respawndant=JeffTheKiller:Clone();
  2004. if PlayerSpawning then --[[ LOOK AT LINE: 2. ]]--
  2005. coroutine.resume(coroutine.create(function()
  2006. if JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid:FindFirstChild("Status")and not JeffTheKillerHumanoid:FindFirstChild("Status"):FindFirstChild("AvalibleSpawns")then
  2007. SpawnModel=Instance.new("Model");
  2008. SpawnModel.Parent=JeffTheKillerHumanoid.Status;
  2009. SpawnModel.Name="AvalibleSpawns";
  2010. else
  2011. SpawnModel=JeffTheKillerHumanoid:FindFirstChild("Status"):FindFirstChild("AvalibleSpawns");
  2012. end;
  2013. function FindSpawn(SearchValue)
  2014. local PartsArchivable=SearchValue:GetChildren();
  2015. for AreaSearch=1,#PartsArchivable do
  2016. if PartsArchivable[AreaSearch].className=="SpawnLocation"then
  2017. local PositionValue=Instance.new("Vector3Value",SpawnModel);
  2018. PositionValue.Value=PartsArchivable[AreaSearch].Position;
  2019. PositionValue.Name=PartsArchivable[AreaSearch].Duration;
  2020. end;
  2021. FindSpawn(PartsArchivable[AreaSearch]);
  2022. end;
  2023. end;
  2024. FindSpawn(Game:GetService("Workspace"));
  2025. local SpawnChilden=SpawnModel:GetChildren();
  2026. if#SpawnChilden>0 then
  2027. local SpawnItself=SpawnChilden[math.random(1,#SpawnChilden)];
  2028. local RespawningForceField=Instance.new("ForceField");
  2029. RespawningForceField.Parent=JeffTheKiller;
  2030. RespawningForceField.Name="SpawnForceField";
  2031. GameDerbis:AddItem(RespawningForceField,SpawnItself.Name);
  2032. JeffTheKiller:MoveTo(SpawnItself.Value+Vector3.new(0,3.5,0));
  2033. else
  2034. if JeffTheKiller:FindFirstChild("SpawnForceField")then
  2035. JeffTheKiller:FindFirstChild("SpawnForceField"):Destroy();
  2036. end;
  2037. JeffTheKiller:MoveTo(Vector3.new(0,115,0));
  2038. end;
  2039. end));
  2040. end;
  2041. function Respawn()
  2042. Wait(5);
  2043. Respawndant.Parent=JeffTheKiller.Parent;
  2044. Respawndant:makeJoints();
  2045. Respawndant:FindFirstChild("Head"):MakeJoints();
  2046. Respawndant:FindFirstChild("Torso"):MakeJoints();
  2047. JeffTheKiller:remove();
  2048. end;
  2049. if AdvancedRespawnScript and JeffTheKiller and JeffTheKillerHumanoid then
  2050. JeffTheKillerHumanoid.Died:connect(Respawn);
  2051. end;
  2052. --[[ By: Brutez, 2/28/2015, 1:34 AM, (UTC-08:00) Pacific Time (US & Canada) ]]--
  2053. end))
  2054. Tool96.Name = "Knife"
  2055. Tool96.Parent = Model0
  2056. Tool96.CanBeDropped = false
  2057. Tool96.Grip = CFrame.new(0, -0.800000012, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  2058. Tool96.GripPos = Vector3.new(0, -0.800000012, 0)
  2059. Part97.Name = "Handle"
  2060. Part97.Parent = Tool96
  2061. Part97.CFrame = CFrame.new(-9.4200058, 2.00000095, 77.4300079, 1, 0, 0, 0, 0, 1, 0, -1, 0)
  2062. Part97.Orientation = Vector3.new(-90, 0, 0)
  2063. Part97.Position = Vector3.new(-9.4200058, 2.00000095, 77.4300079)
  2064. Part97.Rotation = Vector3.new(-90, 0, 0)
  2065. Part97.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  2066. Part97.Size = Vector3.new(0.400000006, 3, 0.800000012)
  2067. Part97.BrickColor = BrickColor.new("Really black")
  2068. Part97.CanCollide = false
  2069. Part97.brickColor = BrickColor.new("Really black")
  2070. Part97.FormFactor = Enum.FormFactor.Custom
  2071. Part97.formFactor = Enum.FormFactor.Custom
  2072. Sound98.Parent = Part97
  2073. Sound98.EmitterSize = 0
  2074. Sound98.MinDistance = 0
  2075. Sound98.SoundId = "rbxassetid://153647514"
  2076. Sound98.Volume = 1
  2077. FileMesh99.Parent = Part97
  2078. FileMesh99.MeshId = "http://www.roblox.com/asset/?id=121944778"
  2079. FileMesh99.TextureId = "http://www.roblox.com/asset/?id=121944805 "
  2080. ParticleEmitter100.Parent = Part97
  2081. ParticleEmitter100.Texture = "rbxgameasset://Images/f94bc32398151444678f59982808bc40"
  2082. ParticleEmitter101.Parent = Part97
  2083. ParticleEmitter101.Texture = "rbxgameasset://Images/293e8492b85204768accaaa332b9fed8"
  2084. ParticleEmitter102.Parent = Part97
  2085. ParticleEmitter102.Texture = "rbxgameasset://Images/293e8492b85204768accaaa332b9fed8 (1)"
  2086. ParticleEmitter103.Parent = Part97
  2087. ParticleEmitter103.Texture = "rbxgameasset://Images/91b056cb0d5025d0a11348d19ed53067"
  2088. Sound104.Parent = Part97
  2089. Sound104.EmitterSize = 0
  2090. Sound104.MinDistance = 0
  2091. Sound104.SoundId = "http://www/Illuminati-Theme-item?id=191907895"
  2092. Sound104.Volume = 1
  2093. LocalScript105.Name = "FirstPersonArms"
  2094. LocalScript105.Parent = Tool96
  2095. table.insert(cors,sandbox(LocalScript105,function()
  2096. wait(0.2)
  2097. local player=game.Players.LocalPlayer
  2098. local camera=workspace.CurrentCamera
  2099. local tool=script.Parent
  2100. local char=player.Character
  2101. local humanoid=char:WaitForChild("Humanoid")
  2102. SETTINGS={
  2103.  
  2104. FIRST_PERSON={
  2105. left_arm=true, --if left arm is Enabled
  2106. right_arm=true, --If right arm is Enabled
  2107. arm_transparency=0, --The transparency of the Arms
  2108. arm_color=BrickColor.new("Really black"), --The colo(u)r of the arms, If below is set to true, This will be the BrickColor of the Arms.
  2109. change_color=false, --Changes the colo(u)r of the arms, If false, Will set them as the Players arm colo(u)r
  2110. add_shirt=true, --If true, add's the Character's shirt to the Arms--
  2111. },
  2112.  
  2113. }
  2114.  
  2115. function FirstPerson()
  2116. if (camera.focus.p - camera.CoordinateFrame.p).magnitude > 1 then
  2117. return false
  2118. else
  2119. return true
  2120. end
  2121. end
  2122. function Start()
  2123. anim_arms=Instance.new("Model")
  2124. anim_arms.Name="Arms_Model"
  2125. local Shirt=player.Character:FindFirstChild("Shirt")
  2126. if Shirt then
  2127. Shirt:clone().Parent=anim_arms
  2128. Instance.new("Humanoid",anim_arms)
  2129. end
  2130. local r,l = char:FindFirstChild("Right Arm"):clone(), char:FindFirstChild("Left Arm"):clone()
  2131. if r and SETTINGS.FIRST_PERSON.right_arm then
  2132. r.Transparency=SETTINGS.FIRST_PERSON.arm_transparency
  2133. r.Material=Enum.Material.SmoothPlastic
  2134. if SETTINGS.FIRST_PERSON.change_color then
  2135. r.BrickColor=SETTINGS.FIRST_PERSON.arm_color
  2136. end
  2137. end
  2138. if l and SETTINGS.FIRST_PERSON.left_arm then
  2139. l.Transparency=SETTINGS.FIRST_PERSON.arm_transparency
  2140. l.Material=Enum.Material.SmoothPlastic
  2141. if SETTINGS.FIRST_PERSON.change_color then
  2142. l.BrickColor=SETTINGS.FIRST_PERSON.arm_color
  2143. end
  2144. end
  2145. local rw,lw = Instance.new("Weld"),Instance.new("Weld")
  2146. if rw and SETTINGS.FIRST_PERSON.right_arm then
  2147. rw.Part0=r
  2148. rw.Part1=char:FindFirstChild("Right Arm")
  2149. rw.Parent=r
  2150. r.Parent=anim_arms
  2151. end
  2152. if lw and SETTINGS.FIRST_PERSON.left_arm then
  2153. lw.Part0=l
  2154. lw.Part1=char:FindFirstChild("Left Arm")
  2155. lw.Parent=l
  2156. l.Parent=anim_arms
  2157. end
  2158. l.CanCollide=false
  2159. r.CanCollide=false
  2160. if SETTINGS.FIRST_PERSON.right_arm then
  2161. if r:FindFirstChild("RightGrip")~=nil then r:FindFirstChild("RightGrip"):Destroy() end
  2162. end
  2163. if tool.Handle:FindFirstChild("Mesh") ~= nil then tool.Handle.Mesh:Destroy() end
  2164. while equipped do
  2165. if FirstPerson() then
  2166. if anim_arms ~= nil then
  2167. anim_arms.Parent=camera
  2168. humanoid.CameraOffset = Vector3.new(0, -0.2, -0.5)
  2169. end
  2170. else
  2171. if anim_arms ~= nil then
  2172. anim_arms.Parent=nil
  2173. humanoid.CameraOffset = Vector3.new(0,0,0)
  2174. end
  2175. end
  2176. wait()
  2177. end
  2178. end
  2179. function End()
  2180. anim_arms:Destroy()
  2181. anim_arms=nil
  2182. humanoid.CameraOffset = Vector3.new(0,0,0)
  2183. end
  2184.  
  2185. tool.Equipped:connect(function ()
  2186. equipped=true
  2187. Start()
  2188. end)
  2189. tool.Unequipped:connect(function ()
  2190. equipped=false
  2191. End()
  2192. end)
  2193. end))
  2194. LocalScript106.Name = "Module"
  2195. LocalScript106.Parent = Tool96
  2196. table.insert(cors,sandbox(LocalScript106,function()
  2197. --Knife Module Script
  2198. --MatrixComplexity
  2199. wait(.2)
  2200.  
  2201.  
  2202. local tool=script.Parent
  2203. local player=game.Players.LocalPlayer
  2204. local char=player.Character
  2205. local humanoid=char:FindFirstChild("Humanoid")
  2206. local camera=workspace.CurrentCamera
  2207. local rightC1 = CFrame.new(-0.5, 0.7, 0) * CFrame.Angles(0, (math.pi / 2), 0)
  2208. local leftC1 = CFrame.new(0, 0.7, 0) * CFrame.Angles(0, (math.pi / 2), 0)
  2209. local mouse=player:GetMouse()
  2210. local equipping=false
  2211. local gettingknife=false
  2212. local laserCharge=false
  2213. local playcharge=false
  2214. local justthrown=false
  2215. local canLaser=false
  2216. local justattacked=false
  2217. local thrownkniferotation=0
  2218. local Damage=110
  2219. local Attacking=false
  2220. local handle=nil
  2221. local WalkSpeeds={16,20}
  2222.  
  2223. SOUNDS={
  2224. throwing={"153647554","153647549"},
  2225. laserthrowing={"138499093"},
  2226. shouts={"241084057","168209314","131076695"},
  2227. striking={"153647529","153647534","153647539","153647540"},
  2228. equip="153647514",
  2229. wallhit={"153647563","153647564"},
  2230. hitplayer={"153647516","153647519","153647522","153647526"},
  2231. deaths={"146594640","146457047","146594648"},
  2232. }
  2233.  
  2234. SETTINGS={
  2235.  
  2236. tool={
  2237. mesh_id="http://www.roblox.com/asset/?id=121944778",
  2238. mesh_type=Enum.MeshType.FileMesh,
  2239. texture_id="http://www.roblox.com/asset/?id=121944805 ",
  2240. mesh_offset=Vector3.new(0,0,0),
  2241. mesh_scale=.9,
  2242. tool_size=Vector3.new(1,1,1),
  2243. tool_transparency=0,
  2244. tool_color=BrickColor.Black(),
  2245. default_tool_size=1,
  2246. },
  2247.  
  2248. }
  2249.  
  2250. function DamageObject(hit)
  2251. local char=hit.Parent
  2252. if char and char~=player.Character and char.Name~="Arms_Model" and hit.Name~="Handle" then
  2253. local h=char:FindFirstChild("Humanoid")
  2254. if h and h.Health > 0 then
  2255. h:TakeDamage(Damage)
  2256. PlaySound("Hit1",char.Torso)
  2257. if h.Health == 0 then
  2258. PlaySound("Hit2",char.Torso)
  2259. end
  2260. end
  2261. end
  2262. end
  2263.  
  2264. function PlaySound(name,ctorso)
  2265. if name=="Throw" then
  2266. tool.Handle.Sound.SoundId = "rbxassetid://" .. SOUNDS.throwing[math.random(1,#SOUNDS.throwing)]
  2267. tool.Handle.Sound:Play()
  2268. elseif name=="ThrowLaser" then
  2269. tool.Handle.Sound.SoundId = "rbxassetid://" .. SOUNDS.laserthrowing[math.random(1,#SOUNDS.laserthrowing)]
  2270. tool.Handle.Sound:Play()
  2271. elseif name=="Equip" then
  2272. tool.Handle.Sound.SoundId = "rbxassetid://" .. SOUNDS.equip
  2273. tool.Handle.Sound:Play()
  2274. elseif name=="Swing" then
  2275. tool.Handle.Sound.SoundId = "rbxassetid://" .. SOUNDS.striking[math.random(1,#SOUNDS.striking)]
  2276. tool.Handle.Sound:Play()
  2277. elseif name=="Hit1" then
  2278. local NewSound=tool.Handle.Sound:clone()
  2279. NewSound.Parent=ctorso
  2280. NewSound.SoundId = "rbxassetid://" .. SOUNDS.hitplayer[math.random(1,#SOUNDS.hitplayer)]
  2281. NewSound:Play()
  2282. NewSound:Destroy()
  2283. elseif name=="Hit2" then
  2284. local NewSound=tool.Handle.Sound:clone()
  2285. NewSound.Parent=ctorso
  2286. NewSound.SoundId = "rbxassetid://" .. SOUNDS.deaths[math.random(1,#SOUNDS.deaths)]
  2287. NewSound:Play()
  2288. NewSound:Destroy()
  2289. elseif name=="Laser" then
  2290. local NewSound=tool.Handle.Sound
  2291. NewSound.SoundId = "rbxassetid://" .. SOUNDS.shouts[math.random(1,#SOUNDS.shouts)]
  2292. NewSound:Play()
  2293. end
  2294. end
  2295.  
  2296. function Throwtool(dPos)
  2297. if not tool.Handle then return end
  2298. local throwingHandle = tool.Handle:Clone()
  2299. game:GetService("Debris"):AddItem(throwingHandle, 5)
  2300. throwingHandle.Transparency=0
  2301. throwingHandle.Parent = workspace
  2302. if player.Character and player.Character.Humanoid then
  2303. throwingHandle.Velocity = (player.Character.Humanoid.TargetPoint - throwingHandle.CFrame.p).unit * 150
  2304. if canLaser then
  2305. throwingHandle.Velocity = (player.Character.Humanoid.TargetPoint - throwingHandle.CFrame.p).unit * 9999
  2306. end
  2307. if mouse.Target ~= nil then
  2308. if mouse.Target.Parent.Name~="Arms_Model" and mouse.Target.Name~="ThrownKnife" and mouse.Target.Name~="Handle" then
  2309. targetpos=player.Character.Humanoid.TargetPoint
  2310. else
  2311. targetpos=Vector3.new(0,-10 ,0)
  2312. end
  2313. end
  2314. -- set the orientation to the direction it is being thrown in
  2315. throwingHandle.CFrame = CFrame.new(throwingHandle.CFrame.p, throwingHandle.CFrame.p + throwingHandle.Velocity) * CFrame.Angles(0, 0, math.rad(-90))
  2316. local floatingForce = Instance.new('BodyForce', throwingHandle)
  2317. floatingForce.force = Vector3.new(0, 196.2 * throwingHandle:GetMass() * 0.98, 0)
  2318. local spin = Instance.new('BodyAngularVelocity', throwingHandle)
  2319. spin.angularvelocity = throwingHandle.CFrame:vectorToWorldSpace(Vector3.new(0, -400, 0))
  2320. spawnPos=player.Character.PrimaryPart.Position
  2321. spawnPos = spawnPos + dPos*5
  2322. if canLaser then
  2323. local Ray = Ray.new(tool.Handle.CFrame.p,(mouse.Hit.p - tool.Handle.CFrame.p).unit * 999)
  2324. local Hit,Position = game.Workspace:FindPartOnRay(Ray,char)
  2325. if Hit then
  2326. if Hit.Parent:FindFirstChild("Humanoid") then
  2327. Hit.Parent.Humanoid:TakeDamage(110)
  2328. laserCharge=true
  2329. end end
  2330. local RayPart = Instance.new("Part",workspace)
  2331. RayPart.Name = "RayPart"
  2332. RayPart.BrickColor = BrickColor.new("Bright red")
  2333. RayPart.Transparency = 0
  2334. RayPart.Anchored = true
  2335. RayPart.CanCollide = false
  2336. RayPart.TopSurface = Enum.SurfaceType.Smooth
  2337. RayPart.BottomSurface = Enum.SurfaceType.Smooth
  2338. RayPart.formFactor = Enum.FormFactor.Custom
  2339. local Distance = (Position-tool.Handle.CFrame.p).magnitude
  2340. RayPart.Size = Vector3.new(0.2,0.2,Distance)
  2341. RayPart.CFrame = CFrame.new(Position,tool.Handle.CFrame.p) * CFrame.new(0,0,-Distance/2)
  2342. game.Debris:addItem(RayPart,.5)
  2343. PlaySound("Laser")
  2344. end
  2345. end
  2346. if throwingHandle then
  2347. local touchedConn = throwingHandle.Touched:connect(function(hit)
  2348. local char=hit.Parent
  2349. camera.CameraSubject=humanoid
  2350. camera.CameraType=Enum.CameraType.Custom
  2351. if char and char~=player.Character and char.Name~="Arms_Model" and hit.Name~="Handle" and hit.Name~="RayPart" then
  2352. local h=char:FindFirstChild("Humanoid")
  2353. if h and h.Health > 0 then
  2354. throwingHandle:Destroy()
  2355. laserCharge=true
  2356. if hit.Name~="Head" or hit.className=="Hat" then
  2357. h:TakeDamage(Damage)
  2358. PlaySound("Hit1",char.Torso)
  2359. if h.Health == 0 then
  2360. PlaySound("Hit2",char.Torso)
  2361. end
  2362. else
  2363. h:TakeDamage(Damage * 2)
  2364. print("Headshot!")
  2365. char.Head.Transparency=1
  2366. char.Head.CanCollide=false
  2367. if char.Head:FindFirstChild("face") then char.Head:FindFirstChild("face").Transparency=1 end
  2368. for _,v in pairs(char:GetChildren()) do
  2369. if v.className=="Hat" then
  2370. v:Destroy()
  2371. end
  2372. end
  2373. for i = 1, 7 do
  2374. local blood=Instance.new("Part")
  2375. blood.FormFactor="Custom"
  2376. blood.Size=Vector3.new(1,.2,1)
  2377. blood.BrickColor=BrickColor.Red()
  2378. blood.TopSurface=0
  2379. blood.BottomSurface=0
  2380. game:GetService("Debris"):AddItem(blood,5)
  2381. blood.Parent=workspace
  2382. blood.Position=char.Head.Position + Vector3.new(math.random(0.2,0.8),0,math.random(0.2,0.8))
  2383. end
  2384. local sound = Instance.new("Sound")
  2385. sound.SoundId = "rbxassetid://142347633"
  2386. sound.Parent=char.Head
  2387. sound.Pitch=1.1
  2388. sound:Play()
  2389. end
  2390. PlaySound("Hit1")
  2391. if h.Health == 0 then
  2392. PlaySound("Hit2")
  2393. end
  2394. elseif hit.Name~="Handle" or hit.Name~="IgnoreThrowingKnives" and hit.Parent.Name~="Arms_Model" and hit.Name~="RayPart" and hit.CanCollide==true then
  2395. local sound=Instance.new("Sound")
  2396. sound.Parent=hit
  2397. sound.SoundId = "rbxassetid://" .. SOUNDS.wallhit[math.random(1,#SOUNDS.wallhit)]
  2398. sound:Play()
  2399. sound:Destroy()
  2400. print("Hit Object: " .. hit.Name)
  2401. local newknife=tool.Handle:clone()
  2402. newknife.Name="ThrownKnife"
  2403. newknife.CFrame = CFrame.new(spawnPos, spawnPos + dPos) * CFrame.Angles(math.pi/-2, 0, 0)
  2404. newknife.Position = targetpos
  2405. throwingHandle:Destroy()
  2406. newknife.Anchored=true
  2407. newknife.CanCollide=true
  2408. newknife.Transparency=0
  2409. newknife.Parent=workspace
  2410. wait(7)
  2411. for i=1,10 do
  2412. newknife.Transparency=i*.1
  2413. wait()
  2414. end
  2415. newknife:Destroy()
  2416. end
  2417. end
  2418. end)
  2419. end
  2420. end
  2421. -- must check if it still exists since we waited
  2422. if throwingHandle then
  2423. throwingHandle.CanCollide = true
  2424. end
  2425.  
  2426. FUNCTIONS={
  2427.  
  2428. CHECKFORFIRSTPERSON=function()
  2429. if (camera.focus.p - camera.CoordinateFrame.p).magnitude > 1 then
  2430. return false
  2431. else
  2432. return true
  2433. end
  2434. end,
  2435.  
  2436. ANIMS=function(state)
  2437. if state then
  2438. mouse.Icon="http://www.roblox.com/asset/?id=54019936"
  2439. --Start Animation
  2440. local mesh=Instance.new("FileMesh")
  2441. mesh.MeshId=SETTINGS.tool.mesh_id
  2442. mesh.TextureId=SETTINGS.tool.texture_id
  2443. mesh.Scale=Vector3.new(SETTINGS.tool.mesh_scale,SETTINGS.tool.mesh_scale,SETTINGS.tool.mesh_scale)
  2444. mesh.Parent=tool.Handle
  2445. if SETTINGS.tool.mesh_scale==.1 then
  2446. tool.GripPos = Vector3.new(0, -0.55, 0)
  2447. elseif SETTINGS.tool.mesh_scale==.2 then
  2448. tool.GripPos = Vector3.new(0, -0.6, 0)
  2449. elseif SETTINGS.tool.mesh_scale==.3 then
  2450. tool.GripPos = Vector3.new(0, -0.65, 0)
  2451. elseif SETTINGS.tool.mesh_scale==.4 then
  2452. tool.GripPos = Vector3.new(0, -0.7, 0)
  2453. elseif SETTINGS.tool.mesh_scale==.5 then
  2454. tool.GripPos = Vector3.new(0, -0.75, 0)
  2455. elseif SETTINGS.tool.mesh_scale==.6 then
  2456. tool.GripPos = Vector3.new(0, -0.8, 0)
  2457. elseif SETTINGS.tool.mesh_scale==.7 then
  2458. tool.GripPos = Vector3.new(0, -0.85, 0)
  2459. elseif SETTINGS.tool.mesh_scale==.8 then
  2460. tool.GripPos = Vector3.new(0, -0.9, 0)
  2461. elseif SETTINGS.tool.mesh_scale==.9 then
  2462. tool.GripPos = Vector3.new(0, -0.95, 0)
  2463. elseif SETTINGS.tool.mesh_scale==1 then
  2464. tool.GripPos = Vector3.new(0, -1, 0)
  2465. else
  2466. print("Invalid tool size! Set to default: " .. SETTINGS.tool.default_tool_size )
  2467. mesh.Scale=Vector3.new(SETTINGS.tool.default_tool_size,SETTINGS.tool.default_tool_size,SETTINGS.tool.default_tool_size)
  2468. if SETTINGS.tool.default_tool_size==.1 then
  2469. tool.GripPos = Vector3.new(0, -0.55, 0)
  2470. elseif SETTINGS.tool.default_tool_size==.2 then
  2471. tool.GripPos = Vector3.new(0, -0.6, 0)
  2472. elseif SETTINGS.tool.default_tool_size==.3 then
  2473. tool.GripPos = Vector3.new(0, -0.65, 0)
  2474. elseif SETTINGS.tool.default_tool_size==.4 then
  2475. tool.GripPos = Vector3.new(0, -0.7, 0)
  2476. elseif SETTINGS.tool.default_tool_size==.5 then
  2477. tool.GripPos = Vector3.new(0, -0.75, 0)
  2478. elseif SETTINGS.tool.default_tool_size==.6 then
  2479. tool.GripPos = Vector3.new(0, -0.8, 0)
  2480. elseif SETTINGS.tool.default_tool_size==.7 then
  2481. tool.GripPos = Vector3.new(0, -0.85, 0)
  2482. elseif SETTINGS.tool.default_tool_size==.8 then
  2483. tool.GripPos = Vector3.new(0, -0.9, 0)
  2484. elseif SETTINGS.tool.default_tool_size==.9 then
  2485. tool.GripPos = Vector3.new(0, -0.95, 0)
  2486. elseif SETTINGS.tool.default_tool_size==1 then
  2487. tool.GripPos = Vector3.new(0, -1, 0)
  2488. else
  2489. print("Invalid default size! Un-equipping and removing Knife...")
  2490. if humanoid then
  2491. humanoid:Unequiptools()
  2492. tool:Destroy()
  2493. end
  2494. end
  2495. end
  2496. torso=char:FindFirstChild("Torso")
  2497. leftarm=torso:FindFirstChild("Left Shoulder")
  2498. if leftarm then
  2499. leftarm.Parent=nil
  2500. newarmweld=Instance.new("Weld")
  2501. newarmweld.Name="LeftWeld"
  2502. newarmweld.Part0=torso
  2503. newarmweld.C0 = CFrame.new(-1.5, 0.7, 0)
  2504. newarmweld.C1 = CFrame.new(0, 0.7, 0)
  2505. newarmweld.Part1=char:FindFirstChild("Left Arm")
  2506. newarmweld.Parent=torso
  2507. end
  2508. humanoid.WalkSpeed=WalkSpeeds[2]
  2509. for i = 1, 15, 3 do
  2510. if equipped then
  2511. torso:FindFirstChild("Right Shoulder").C1 = rightC1 * CFrame.Angles((-i * (math.pi / 90)),(-i * (math.pi / 90)),(i * (math.pi / 210)))
  2512. torso:FindFirstChild("LeftWeld").C1 = CFrame.new(-0.2, .7, 0) * CFrame.Angles((-i * (math.pi / 60)),(i * (math.pi / 90)),(-i * (math.pi / 240)))
  2513. end
  2514. wait()
  2515. end
  2516. else
  2517. humanoid.WalkSpeed=WalkSpeeds[1]
  2518. torso:FindFirstChild("Right Shoulder").C1 = rightC1 * CFrame.new(0,-0.2,0)
  2519. tool.GripForward = Vector3.new(0,0,-1)
  2520. newarmweld:Destroy()
  2521. leftarm.Parent=torso
  2522. mouse.Icon=""
  2523. torso:FindFirstChild("Neck").C0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  2524. torso:FindFirstChild("Right Shoulder").C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  2525. end
  2526. end
  2527. }
  2528.  
  2529. tool.Equipped:connect(function ()
  2530. equipped=true
  2531. PlaySound("Equip")
  2532. FUNCTIONS.ANIMS(true)
  2533. end)
  2534. tool.Unequipped:connect(function ()
  2535. equipped=false
  2536. FUNCTIONS.ANIMS(false)
  2537. end)
  2538. tool.Handle.Touched:connect(function (hit)
  2539. if Attacking then
  2540. DamageObject(hit)
  2541. end
  2542. end)
  2543. tool.Activated:connect(function ()
  2544. if Attacking then return end
  2545. if not tool.Enabled then return end
  2546. justthrown=false
  2547. justattacked=false
  2548. if not gettingknife and not justthrown and not Attacking then
  2549. HeldTime=time()
  2550. end
  2551. playcharge=true
  2552. wait(.15)
  2553. while gettingknife do
  2554. wait()
  2555. end
  2556. local speed=1
  2557. for i = 1, 15, speed do
  2558. if playcharge and equipped and not gettingknife and not justthrown and not Attacking then
  2559. torso:FindFirstChild("Right Shoulder").C1 = CFrame.new(-0.5, 0.5, 0, 0.195277825, -0.747909963, 0.634426773, 0.482016951, 0.636551082, 0.602048457, -0.854123056, 0.188237742, 0.484809577) * CFrame.Angles((i * (math.pi / 50)), 0, (-i * (math.pi / 25)))
  2560. torso:FindFirstChild("LeftWeld").C1 = CFrame.new(-0.2, .7, 0, 0.858912528, 0.165011853, 0.484809607, -0.464581847, 0.649385393, 0.602048457, -0.215483144, -0.742340684, 0.634426773) * CFrame.Angles((-i * (math.pi / 75)),(i * (math.pi / 180)),0)
  2561. player.Character["Right Arm"].RightGrip.C1 = CFrame.new(0, -0.800000012, 0.05, 1, 0, 0, 0, 1, 0, 0, 0, 1) * CFrame.Angles((-i * (math.pi / 150)),0,0)
  2562. wait()
  2563. end
  2564. end
  2565. if playcharge then
  2566. canLaser=true
  2567. end
  2568. end)
  2569. tool.Deactivated:connect(function ()
  2570. if not tool.Enabled then return end
  2571. currTime=time()
  2572. playcharge=false
  2573. if HeldTime and currTime - HeldTime > 0.2 and
  2574. currTime - HeldTime > 0.01 and not justthrown and not gettingknife then
  2575. if not Attacking and not justattacked then
  2576. print("Throw")
  2577. if canLaser then
  2578. PlaySound("ThrowLaser")
  2579. else
  2580. PlaySound("Throw")
  2581. end
  2582. tool.Handle.Transparency=1
  2583. local targetPos = player.Character.Humanoid.TargetPoint
  2584. local lookAt = (targetPos - player.Character.PrimaryPart.Position).unit
  2585. local switchEvenOddParity = 1
  2586. local angle = math.ceil((1-1)/2)*math.pi/12*switchEvenOddParity
  2587. Throwtool(CFrame.Angles(0, angle, 0) * lookAt)
  2588. wait()
  2589. canLaser=false
  2590. HeldTime=0
  2591. gettingknife=true
  2592. mouse.Icon="http://www.roblox.com/asset/?id=54020165"
  2593. player.Character["Right Arm"].RightGrip.C1 = CFrame.new(0, -0.800000012, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  2594. for i = 1, 15, .8 do
  2595. if equipped then
  2596. torso:FindFirstChild("Right Shoulder").C1 = CFrame.new(-0.5, 0.5, 0, 0.0719629526, 0.22870943, 0.970831275, -0.981789052, 0.187819958, 0.0285283029, -0.175816804, -0.955204487, 0.238060504) * CFrame.Angles(0, 0, (i * (math.pi / 15)))
  2597. torso:FindFirstChild("LeftWeld").C1 = CFrame.new(-0.2, 0.7, 0, 0.703028679, -0.151466534, 0.694844246, -0.673604906, 0.171488613, 0.718921423, -0.228050426, -0.973472893, 0.0185328126) * CFrame.Angles((i * (math.pi / 60)),(-i * (math.pi / 180)),(i * (math.pi / 60)))
  2598. wait()
  2599. end
  2600. end
  2601. justthrown=true
  2602. tool.Handle.Transparency=0
  2603. PlaySound("Equip")
  2604. mouse.Icon="http://www.roblox.com/asset/?id=54019936"
  2605. tool.GripForward = Vector3.new(0,0,-1)
  2606. for i = 1, 15, 1 do
  2607. if equipped then
  2608. torso:FindFirstChild("Right Shoulder").C1 = CFrame.new(-0.5, 0.5, 0, -0.071962975, -0.22870943, 0.970831275, 0.981789052, -0.187820047, 0.0285283029, 0.175816894, 0.955204487, 0.238060504) * CFrame.Angles(0, 0, (-i * (math.pi / 30)))
  2609. wait()
  2610. end
  2611. end
  2612. gettingknife=false
  2613. for i = 1, 15, 3 do
  2614. if equipped then
  2615. torso:FindFirstChild("Right Shoulder").C1 = rightC1 * CFrame.Angles((-i * (math.pi / 90)),(-i * (math.pi / 90)),(i * (math.pi / 210)))
  2616. torso:FindFirstChild("LeftWeld").C1 = CFrame.new(-0.2, .7, 0) * CFrame.Angles((-i * (math.pi / 60)),(i * (math.pi / 90)),(-i * (math.pi / 240)))
  2617. end
  2618. wait()
  2619. end
  2620. end
  2621. else
  2622. if not justthrown and not gettingknife then
  2623. if Attacking then return end
  2624. print("Attack")
  2625. HeldTime=0
  2626. Attacking=true
  2627. justattacked=true
  2628. if math.random(1,2)==1 then
  2629. for i = 1, 15, 3 do
  2630. if equipped and not gettingknife and not justthrown then
  2631. torso:FindFirstChild("Right Shoulder").C1 = CFrame.new(-0.5, 0.5, 0, 0.195277825, -0.747909963, 0.634426773, 0.482016951, 0.636551082, 0.602048457, -0.854123056, 0.188237742, 0.484809577) * CFrame.Angles((i * (math.pi / 65)), 0, (-i * (math.pi / 30)))
  2632. torso:FindFirstChild("LeftWeld").C1 = CFrame.new(-0.2, .7, 0, 0.858912528, 0.165011853, 0.484809607, -0.464581847, 0.649385393, 0.602048457, -0.215483144, -0.742340684, 0.634426773) * CFrame.Angles((-i * (math.pi / 75)),(i * (math.pi / 180)),0)
  2633. wait()
  2634. end
  2635. end
  2636. PlaySound("Swing")
  2637. for i = 1, 15, 3 do
  2638. if equipped and not gettingknife and not justthrown then
  2639. torso:FindFirstChild("Right Shoulder").C1 = CFrame.new(-0.5, 0.5, 0, 0.0719629526, 0.22870943, 0.970831275, -0.981789052, 0.187819958, 0.0285283029, -0.175816804, -0.955204487, 0.238060504) * CFrame.Angles(0, 0, (i * (math.pi / 15)))
  2640. torso:FindFirstChild("LeftWeld").C1 = CFrame.new(-0.2, 0.7, 0, 0.703028679, -0.151466534, 0.694844246, -0.673604906, 0.171488613, 0.718921423, -0.228050426, -0.973472893, 0.0185328126) * CFrame.Angles((i * (math.pi / 60)),(-i * (math.pi / 180)),(i * (math.pi / 60)))
  2641. wait()
  2642. end
  2643. end
  2644. for i = 1, 15, 3 do
  2645. if equipped and not justthrown and not gettingknife then
  2646. torso:FindFirstChild("Right Shoulder").C1 = CFrame.new(-0.5, 0.5, 0, -0.071962975, -0.22870943, 0.970831275, 0.981789052, -0.187820047, 0.0285283029, 0.175816894, 0.955204487, 0.238060504) * CFrame.Angles(0, 0, (-i * (math.pi / 30)))
  2647. wait()
  2648. end
  2649. end
  2650. for i = 1, 15, 3 do
  2651. equipping=true
  2652. if equipped and not gettingknife and not justthrown then
  2653. torso:FindFirstChild("Right Shoulder").C1 = rightC1 * CFrame.Angles((-i * (math.pi / 90)),(-i * (math.pi / 90)),(i * (math.pi / 210)))
  2654. torso:FindFirstChild("LeftWeld").C1 = CFrame.new(-0.2, .7, 0) * CFrame.Angles((-i * (math.pi / 60)),(i * (math.pi / 90)),(-i * (math.pi / 240)))
  2655. end
  2656. wait()
  2657. end
  2658. Attacking=false
  2659. else
  2660. for i = 1, 15, 3 do
  2661. if equipped and not gettingknife and not justthrown then
  2662. torso:FindFirstChild("Right Shoulder").C1 = CFrame.new(-0.3, 0.5, 0, 0.195277825, -0.747909963, 0.634426773, 0.482016951, 0.636551082, 0.602048457, -0.854123056, 0.188237742, 0.484809577) * CFrame.Angles((i * (math.pi / 40)),(-i * (math.pi / 45)),(i * (math.pi / 60)))
  2663. end
  2664. wait()
  2665. end
  2666. PlaySound("Swing")
  2667. for i = 1, 15, 3 do
  2668. if equipped and not gettingknife and not justthrown then
  2669. torso:FindFirstChild("Right Shoulder").C1 = CFrame.new(-0.2, 0.5, -.3, 0.852928281, -0.428775758, 0.29776603, 0.516928136, 0.614185035, -0.596290231, 0.0727913082, 0.662516415, 0.745502114) * CFrame.Angles((-i * (math.pi / 45)),0,0)
  2670. torso:FindFirstChild("LeftWeld").C1 = CFrame.new(-0.200000003, 0.7, 0, 0.849384904, 0.16895318, 0.5, -0.48470962, 0.624545038, 0.612372398, -0.208810255, -0.762494743, 0.612372398) * CFrame.Angles((i * (math.pi / 60)),(-i * (math.pi / 180)),(i * (math.pi / 60)))
  2671. end
  2672. wait()
  2673. end
  2674. for i = 1, 15, 3 do
  2675. if equipped and not gettingknife and not justthrown then
  2676. torso:FindFirstChild("Right Shoulder").C1 = CFrame.new(-0.3, 0.5, -0.300000012, 0.852928281, -0.472260833, -0.222447708, 0.516928136, 0.82349503, 0.233754784, 0.0727913082, -0.314365625, 0.946507096) * CFrame.Angles((i * (math.pi / 45)),0,0)
  2677. end
  2678. wait()
  2679. end
  2680. for i = 1, 15, 3 do
  2681. if equipped and not gettingknife and not justthrown then
  2682. torso:FindFirstChild("Right Shoulder").C1 = rightC1 * CFrame.Angles((-i * (math.pi / 90)),(-i * (math.pi / 90)),(i * (math.pi / 210)))
  2683. torso:FindFirstChild("LeftWeld").C1 = CFrame.new(-0.2, .7, 0) * CFrame.Angles((-i * (math.pi / 60)),(i * (math.pi / 90)),(-i * (math.pi / 240)))
  2684. end
  2685. wait()
  2686. end
  2687. Attacking=false
  2688. end
  2689. end
  2690. end
  2691. end)
  2692.  
  2693. mouse.Move:connect(function ()
  2694. if equipped and mouse then
  2695. if (mouse.Hit.p - mouse.Origin.p).unit.y < 0.25 and (mouse.Hit.p - mouse.Origin.p).unit.y > -0.25 then
  2696. torso:FindFirstChild("Right Shoulder").C0 = CFrame.new(.9,.5,0) * CFrame.Angles(0,math.rad(90),0) * CFrame.Angles(0, 0, math.asin((mouse.Hit.p - mouse.Origin.p).unit.y))
  2697. torso:FindFirstChild("LeftWeld").C0 = CFrame.new(-1.5,0.5,0) * CFrame.Angles(0, 0, math.asin((mouse.Hit.p - mouse.Origin.p).unit.y))
  2698. torso:FindFirstChild("Neck").C0 = CFrame.new(0,1,0) * CFrame.Angles(math.rad(-90),0,math.rad(180)) * CFrame.Angles(math.asin(-(mouse.Hit.p - mouse.Origin.p).unit.y), 0, 0)
  2699. end
  2700. end
  2701. end)
  2702. end))
  2703. ScreenGui107.Parent = Tool96
  2704. TextLabel108.Name = "Devs"
  2705. TextLabel108.Parent = ScreenGui107
  2706. TextLabel108.Position = UDim2.new(0.00999999978, 0, 0.899999976, 0)
  2707. TextLabel108.Size = UDim2.new(0, 175, 0, 20)
  2708. TextLabel108.BackgroundColor = BrickColor.new("Really black")
  2709. TextLabel108.BackgroundColor3 = Color3.new(0, 0, 0)
  2710. TextLabel108.BorderColor = BrickColor.new("Teal")
  2711. TextLabel108.BorderColor3 = Color3.new(0.027451, 1, 0.482353)
  2712. TextLabel108.BorderSizePixel = 2
  2713. TextLabel108.Font = Enum.Font.SourceSans
  2714. TextLabel108.FontSize = Enum.FontSize.Size14
  2715. TextLabel108.Text = "Knife Scripted by Cryme Studios"
  2716. TextLabel108.TextColor = BrickColor.new("Teal")
  2717. TextLabel108.TextColor3 = Color3.new(0.0823529, 1, 0.494118)
  2718. TextLabel108.TextSize = 14
  2719. TextLabel108.TextTransparency = 1
  2720. Sound109.Name = "Hit1"
  2721. Sound109.Parent = Tool96
  2722. Sound109.EmitterSize = 0
  2723. Sound109.MinDistance = 0
  2724. Sound109.Pitch = 1.0225422382355
  2725. Sound109.PlaybackSpeed = 1.0225422382355
  2726. Sound109.SoundId = "rbxassetid://91154909"
  2727. Sound109.Volume = 1
  2728. Sound110.Name = "Hit2"
  2729. Sound110.Parent = Tool96
  2730. Sound110.EmitterSize = 0
  2731. Sound110.MinDistance = 0
  2732. Sound110.Pitch = 1.0092434883118
  2733. Sound110.PlaybackSpeed = 1.0092434883118
  2734. Sound110.SoundId = "rbxassetid://91154932"
  2735. Sound110.Volume = 1
  2736. Sound111.Name = "Hit3"
  2737. Sound111.Parent = Tool96
  2738. Sound111.EmitterSize = 0
  2739. Sound111.MinDistance = 0
  2740. Sound111.Pitch = 1.0101846456528
  2741. Sound111.PlaybackSpeed = 1.0101846456528
  2742. Sound111.SoundId = "rbxassetid://91154954"
  2743. Sound111.Volume = 1
  2744. CharacterMesh112.Name = "Zombie Right Leg"
  2745. CharacterMesh112.Parent = Model0
  2746. CharacterMesh112.BodyPart = Enum.BodyPart.RightLeg
  2747. CharacterMesh112.MeshId = 37683227
  2748. CharacterMesh112.OverlayTextureId = 37687646
  2749. Camera113.Name = "ThumbnailCamera"
  2750. Camera113.Parent = Model0
  2751. Camera113.CFrame = CFrame.new(71.4895935, 4.86232519, -294.831085, -0.766947389, 0.207833096, -0.607122064, -0, 0.946100354, 0.323873848, 0.641710043, 0.248394206, -0.725609183)
  2752. Camera113.CameraSubject = Part56
  2753. Camera113.CoordinateFrame = CFrame.new(71.4895935, 4.86232519, -294.831085, -0.766947389, 0.207833096, -0.607122064, -0, 0.946100354, 0.323873848, 0.641710043, 0.248394206, -0.725609183)
  2754. Camera113.Focus = CFrame.new(72.7038498, 4.214571, -293.379852, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  2755. Camera113.focus = CFrame.new(72.7038498, 4.214571, -293.379852, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  2756. for i,v in pairs(mas:GetChildren()) do
  2757. v.Parent = workspace
  2758. pcall(function() v:MakeJoints() end)
  2759. end
  2760. mas:Destroy()
  2761. for i,v in pairs(cors) do
  2762. spawn(function()
  2763. pcall(v)
  2764. end)
  2765. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement