Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --https://github.com/Mokiros/roblox-FE-compatibility
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,Mouse,mouse,UserInputService,ContextActionService = owner
- local RealPlayer = Player
- 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
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- Model0 = Instance.new("Model")
- Part1 = Instance.new("Part")
- SpecialMesh2 = Instance.new("SpecialMesh")
- Sound3 = Instance.new("Sound")
- RemoteEvent4 = Instance.new("RemoteEvent")
- Sound5 = Instance.new("Sound")
- RemoteEvent6 = Instance.new("RemoteEvent")
- Sound7 = Instance.new("Sound")
- RemoteEvent8 = Instance.new("RemoteEvent")
- Sound9 = Instance.new("Sound")
- RemoteEvent10 = Instance.new("RemoteEvent")
- Sound11 = Instance.new("Sound")
- RemoteEvent12 = Instance.new("RemoteEvent")
- Sound13 = Instance.new("Sound")
- RemoteEvent14 = Instance.new("RemoteEvent")
- Sound15 = Instance.new("Sound")
- RemoteEvent16 = Instance.new("RemoteEvent")
- Sound17 = Instance.new("Sound")
- RemoteEvent18 = Instance.new("RemoteEvent")
- Sound19 = Instance.new("Sound")
- RemoteEvent20 = Instance.new("RemoteEvent")
- Sound21 = Instance.new("Sound")
- Sound22 = Instance.new("Sound")
- Sound23 = Instance.new("Sound")
- PointLight24 = Instance.new("PointLight")
- Decal25 = Instance.new("Decal")
- Weld26 = Instance.new("Weld")
- Part27 = Instance.new("Part")
- Decal28 = Instance.new("Decal")
- Motor6D29 = Instance.new("Motor6D")
- Motor6D30 = Instance.new("Motor6D")
- Motor6D31 = Instance.new("Motor6D")
- Motor6D32 = Instance.new("Motor6D")
- Motor6D33 = Instance.new("Motor6D")
- Part34 = Instance.new("Part")
- Weld35 = Instance.new("Weld")
- Part36 = Instance.new("Part")
- Weld37 = Instance.new("Weld")
- Weld38 = Instance.new("Weld")
- Part39 = Instance.new("Part")
- Part40 = Instance.new("Part")
- Humanoid41 = Instance.new("Humanoid")
- Model42 = Instance.new("Model")
- Model43 = Instance.new("Model")
- Part44 = Instance.new("Part")
- Motor6D45 = Instance.new("Motor6D")
- Script46 = Instance.new("Script")
- LocalScript47 = Instance.new("LocalScript")
- Script48 = Instance.new("Script")
- Accessory49 = Instance.new("Accessory")
- Part50 = Instance.new("Part")
- SpecialMesh51 = Instance.new("SpecialMesh")
- Vector3Value52 = Instance.new("Vector3Value")
- Weld53 = Instance.new("Weld")
- BodyColors54 = Instance.new("BodyColors")
- Accessory55 = Instance.new("Accessory")
- Part56 = Instance.new("Part")
- SpecialMesh57 = Instance.new("SpecialMesh")
- Vector3Value58 = Instance.new("Vector3Value")
- Weld59 = Instance.new("Weld")
- Camera60 = Instance.new("Camera")
- Pants61 = Instance.new("Pants")
- ShirtGraphic62 = Instance.new("ShirtGraphic")
- CharacterMesh63 = Instance.new("CharacterMesh")
- CharacterMesh64 = Instance.new("CharacterMesh")
- Animation65 = Instance.new("Animation")
- Accessory66 = Instance.new("Accessory")
- Part67 = Instance.new("Part")
- SpecialMesh68 = Instance.new("SpecialMesh")
- Vector3Value69 = Instance.new("Vector3Value")
- Shirt70 = Instance.new("Shirt")
- CharacterMesh71 = Instance.new("CharacterMesh")
- CharacterMesh72 = Instance.new("CharacterMesh")
- Script73 = Instance.new("Script")
- StringValue74 = Instance.new("StringValue")
- Animation75 = Instance.new("Animation")
- StringValue76 = Instance.new("StringValue")
- Animation77 = Instance.new("Animation")
- StringValue78 = Instance.new("StringValue")
- Animation79 = Instance.new("Animation")
- NumberValue80 = Instance.new("NumberValue")
- Animation81 = Instance.new("Animation")
- NumberValue82 = Instance.new("NumberValue")
- StringValue83 = Instance.new("StringValue")
- Animation84 = Instance.new("Animation")
- StringValue85 = Instance.new("StringValue")
- Animation86 = Instance.new("Animation")
- StringValue87 = Instance.new("StringValue")
- Animation88 = Instance.new("Animation")
- StringValue89 = Instance.new("StringValue")
- Animation90 = Instance.new("Animation")
- StringValue91 = Instance.new("StringValue")
- Animation92 = Instance.new("Animation")
- Script93 = Instance.new("Script")
- Script94 = Instance.new("Script")
- Script95 = Instance.new("Script")
- Tool96 = Instance.new("Tool")
- Part97 = Instance.new("Part")
- Sound98 = Instance.new("Sound")
- FileMesh99 = Instance.new("FileMesh")
- ParticleEmitter100 = Instance.new("ParticleEmitter")
- ParticleEmitter101 = Instance.new("ParticleEmitter")
- ParticleEmitter102 = Instance.new("ParticleEmitter")
- ParticleEmitter103 = Instance.new("ParticleEmitter")
- Sound104 = Instance.new("Sound")
- LocalScript105 = Instance.new("LocalScript")
- LocalScript106 = Instance.new("LocalScript")
- ScreenGui107 = Instance.new("ScreenGui")
- TextLabel108 = Instance.new("TextLabel")
- Sound109 = Instance.new("Sound")
- Sound110 = Instance.new("Sound")
- Sound111 = Instance.new("Sound")
- CharacterMesh112 = Instance.new("CharacterMesh")
- Camera113 = Instance.new("Camera")
- Model0.Name = "Clown"
- Model0.Parent = mas
- Model0.PrimaryPart = Part1
- Part1.Name = "Head"
- Part1.Parent = Model0
- Part1.CFrame = CFrame.new(-10.9200058, 4.50000095, 78.230011, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part1.Position = Vector3.new(-10.9200058, 4.50000095, 78.230011)
- Part1.Color = Color3.new(0.972549, 0.972549, 0.972549)
- Part1.Size = Vector3.new(2, 1, 1)
- Part1.BrickColor = BrickColor.new("Institutional white")
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.brickColor = BrickColor.new("Institutional white")
- Part1.FormFactor = Enum.FormFactor.Symmetric
- Part1.formFactor = Enum.FormFactor.Symmetric
- SpecialMesh2.Parent = Part1
- SpecialMesh2.Scale = Vector3.new(1.25, 1.25, 1.25)
- Sound3.Name = "GettingUp"
- Sound3.Parent = Part1
- Sound3.MaxDistance = 150
- Sound3.EmitterSize = 5
- Sound3.MinDistance = 5
- Sound3.SoundId = "rbxasset://sounds/action_get_up.mp3"
- Sound3.Volume = 0.64999997615814
- RemoteEvent4.Name = "CharacterSoundEvent"
- RemoteEvent4.Parent = Sound3
- Sound5.Name = "Died"
- Sound5.Parent = Part1
- Sound5.MaxDistance = 150
- Sound5.EmitterSize = 5
- Sound5.MinDistance = 5
- Sound5.SoundId = "rbxasset://sounds/uuhhh.mp3"
- Sound5.Volume = 0.64999997615814
- RemoteEvent6.Name = "CharacterSoundEvent"
- RemoteEvent6.Parent = Sound5
- Sound7.Name = "FreeFalling"
- Sound7.Parent = Part1
- Sound7.Looped = true
- Sound7.TimePosition = 0.23380919942974
- Sound7.MaxDistance = 150
- Sound7.EmitterSize = 5
- Sound7.MinDistance = 5
- Sound7.SoundId = "rbxasset://sounds/action_falling.mp3"
- Sound7.Volume = 0
- RemoteEvent8.Name = "CharacterSoundEvent"
- RemoteEvent8.Parent = Sound7
- Sound9.Name = "Jumping"
- Sound9.Parent = Part1
- Sound9.MaxDistance = 150
- Sound9.EmitterSize = 5
- Sound9.MinDistance = 5
- Sound9.SoundId = "rbxasset://sounds/action_jump.mp3"
- Sound9.Volume = 0.64999997615814
- RemoteEvent10.Name = "CharacterSoundEvent"
- RemoteEvent10.Parent = Sound9
- Sound11.Name = "Landing"
- Sound11.Parent = Part1
- Sound11.MaxDistance = 150
- Sound11.EmitterSize = 5
- Sound11.MinDistance = 5
- Sound11.SoundId = "rbxasset://sounds/action_jump_land.mp3"
- Sound11.Volume = 1
- RemoteEvent12.Name = "CharacterSoundEvent"
- RemoteEvent12.Parent = Sound11
- Sound13.Name = "Splash"
- Sound13.Parent = Part1
- Sound13.MaxDistance = 150
- Sound13.EmitterSize = 5
- Sound13.MinDistance = 5
- Sound13.SoundId = "rbxasset://sounds/impact_water.mp3"
- Sound13.Volume = 0.64999997615814
- RemoteEvent14.Name = "CharacterSoundEvent"
- RemoteEvent14.Parent = Sound13
- Sound15.Name = "Running"
- Sound15.Parent = Part1
- Sound15.Looped = true
- Sound15.MaxDistance = 150
- Sound15.EmitterSize = 5
- Sound15.MinDistance = 5
- Sound15.Pitch = 1.8500000238419
- Sound15.PlaybackSpeed = 1.8500000238419
- Sound15.SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3"
- Sound15.Volume = 0.64999997615814
- RemoteEvent16.Name = "CharacterSoundEvent"
- RemoteEvent16.Parent = Sound15
- Sound17.Name = "Swimming"
- Sound17.Parent = Part1
- Sound17.Looped = true
- Sound17.MaxDistance = 150
- Sound17.EmitterSize = 5
- Sound17.MinDistance = 5
- Sound17.Pitch = 1.6000000238419
- Sound17.PlaybackSpeed = 1.6000000238419
- Sound17.SoundId = "rbxasset://sounds/action_swim.mp3"
- Sound17.Volume = 0.64999997615814
- RemoteEvent18.Name = "CharacterSoundEvent"
- RemoteEvent18.Parent = Sound17
- Sound19.Name = "Climbing"
- Sound19.Parent = Part1
- Sound19.Looped = true
- Sound19.MaxDistance = 150
- Sound19.EmitterSize = 5
- Sound19.MinDistance = 5
- Sound19.SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3"
- Sound19.Volume = 0.64999997615814
- RemoteEvent20.Name = "CharacterSoundEvent"
- RemoteEvent20.Parent = Sound19
- Sound21.Parent = Part1
- Sound21.Looped = true
- Sound21.Playing = true
- Sound21.SoundId = "rbxassetid://531100211"
- Sound22.Name = "Jeff_Susto2"
- Sound22.Parent = Part1
- Sound22.Playing = true
- Sound22.SoundId = "rbxassetid://380102473"
- Sound22.Volume = 1
- Sound23.Parent = Part1
- Sound23.Looped = true
- Sound23.Playing = true
- Sound23.SoundId = "rbxassetid://815335430"
- Sound23.Volume = 1
- PointLight24.Parent = Part1
- PointLight24.Color = Color3.new(1, 0, 0)
- PointLight24.Range = 9
- PointLight24.Brightness = 9
- Decal25.Parent = Part1
- Decal25.Texture = "http://www.roblox.com/asset/?id=1004502106"
- Weld26.Name = "HeadWeld"
- Weld26.Parent = Part1
- Weld26.C0 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld26.C1 = CFrame.new(0, 0.649999976, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld26.Part0 = Part1
- Weld26.Part1 = Part67
- Weld26.part1 = Part67
- Part27.Name = "Torso"
- Part27.Parent = Model0
- Part27.CFrame = CFrame.new(-10.9200058, 3.00000095, 78.230011, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part27.Position = Vector3.new(-10.9200058, 3.00000095, 78.230011)
- Part27.Color = Color3.new(0.972549, 0.972549, 0.972549)
- Part27.Size = Vector3.new(2, 2, 1)
- Part27.BrickColor = BrickColor.new("Institutional white")
- Part27.LeftParamA = 0
- Part27.LeftParamB = 0
- Part27.LeftSurface = Enum.SurfaceType.Weld
- Part27.RightParamA = 0
- Part27.RightParamB = 0
- Part27.RightSurface = Enum.SurfaceType.Weld
- Part27.brickColor = BrickColor.new("Institutional white")
- Part27.FormFactor = Enum.FormFactor.Symmetric
- Part27.formFactor = Enum.FormFactor.Symmetric
- Decal28.Name = "roblox"
- Decal28.Parent = Part27
- Decal28.Texture = "http://www.roblox.com/asset/?id=1166033059"
- Motor6D29.Name = "Right Shoulder"
- Motor6D29.Parent = Part27
- Motor6D29.MaxVelocity = 0.10000000149012
- Motor6D29.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Motor6D29.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Motor6D29.Part0 = Part27
- Motor6D29.Part1 = Part36
- Motor6D29.part1 = Part36
- Motor6D30.Name = "Left Shoulder"
- Motor6D30.Parent = Part27
- Motor6D30.MaxVelocity = 0.10000000149012
- Motor6D30.C0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Motor6D30.C1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Motor6D30.Part0 = Part27
- Motor6D30.Part1 = Part34
- Motor6D30.part1 = Part34
- Motor6D31.Name = "Right Hip"
- Motor6D31.Parent = Part27
- Motor6D31.MaxVelocity = 0.10000000149012
- Motor6D31.C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Motor6D31.C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Motor6D31.Part0 = Part27
- Motor6D31.Part1 = Part40
- Motor6D31.part1 = Part40
- Motor6D32.Name = "Left Hip"
- Motor6D32.Parent = Part27
- Motor6D32.MaxVelocity = 0.10000000149012
- Motor6D32.C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Motor6D32.C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Motor6D32.Part0 = Part27
- Motor6D32.Part1 = Part39
- Motor6D32.part1 = Part39
- Motor6D33.Name = "Neck"
- Motor6D33.Parent = Part27
- Motor6D33.MaxVelocity = 0.10000000149012
- Motor6D33.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- Motor6D33.C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- Motor6D33.Part0 = Part27
- Motor6D33.Part1 = Part1
- Motor6D33.part1 = Part1
- Part34.Name = "Left Arm"
- Part34.Parent = Model0
- Part34.CFrame = CFrame.new(-12.4200058, 3.00000095, 78.230011, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part34.Position = Vector3.new(-12.4200058, 3.00000095, 78.230011)
- Part34.Color = Color3.new(0.972549, 0.972549, 0.972549)
- Part34.Size = Vector3.new(1, 2, 1)
- Part34.BrickColor = BrickColor.new("Institutional white")
- Part34.CanCollide = false
- Part34.brickColor = BrickColor.new("Institutional white")
- Part34.FormFactor = Enum.FormFactor.Symmetric
- Part34.formFactor = Enum.FormFactor.Symmetric
- Weld35.Name = "LeftGrip"
- Weld35.Parent = Part34
- Weld35.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld35.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld35.Part0 = Part34
- Weld35.Part1 = Part34
- Weld35.part1 = Part34
- Part36.Name = "Right Arm"
- Part36.Parent = Model0
- Part36.CFrame = CFrame.new(-9.4200058, 3.00000095, 78.230011, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part36.Position = Vector3.new(-9.4200058, 3.00000095, 78.230011)
- Part36.Color = Color3.new(0.972549, 0.972549, 0.972549)
- Part36.Size = Vector3.new(1, 2, 1)
- Part36.BrickColor = BrickColor.new("Institutional white")
- Part36.CanCollide = false
- Part36.brickColor = BrickColor.new("Institutional white")
- Part36.FormFactor = Enum.FormFactor.Symmetric
- Part36.formFactor = Enum.FormFactor.Symmetric
- Weld37.Name = "RightGripWeld"
- Weld37.Parent = Part36
- Weld37.C0 = CFrame.new(-1.29999995, 1.16840947, 0.750634551, 1, 0, 0, 0, 0.968409479, 0.249365434, 0, -0.249365434, 0.968409479)
- Weld37.C1 = CFrame.new(-1.5, -0, -0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld38.Name = "RightGrip"
- Weld38.Parent = Part36
- Weld38.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld38.C1 = CFrame.new(0, -0.800000012, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld38.Part0 = Part36
- Weld38.Part1 = Part97
- Weld38.part1 = Part97
- Part39.Name = "Left Leg"
- Part39.Parent = Model0
- Part39.CFrame = CFrame.new(-11.4200058, 1.00000095, 78.230011, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part39.Position = Vector3.new(-11.4200058, 1.00000095, 78.230011)
- Part39.Color = Color3.new(0.972549, 0.972549, 0.972549)
- Part39.Size = Vector3.new(1, 2, 1)
- Part39.BottomSurface = Enum.SurfaceType.Smooth
- Part39.BrickColor = BrickColor.new("Institutional white")
- Part39.CanCollide = false
- Part39.brickColor = BrickColor.new("Institutional white")
- Part39.FormFactor = Enum.FormFactor.Symmetric
- Part39.formFactor = Enum.FormFactor.Symmetric
- Part40.Name = "Right Leg"
- Part40.Parent = Model0
- Part40.CFrame = CFrame.new(-10.4200058, 1.00000095, 78.230011, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part40.Position = Vector3.new(-10.4200058, 1.00000095, 78.230011)
- Part40.Color = Color3.new(0.972549, 0.972549, 0.972549)
- Part40.Size = Vector3.new(1, 2, 1)
- Part40.BottomSurface = Enum.SurfaceType.Smooth
- Part40.BrickColor = BrickColor.new("Institutional white")
- Part40.CanCollide = false
- Part40.brickColor = BrickColor.new("Institutional white")
- Part40.FormFactor = Enum.FormFactor.Symmetric
- Part40.formFactor = Enum.FormFactor.Symmetric
- Humanoid41.Name = "ColdBloodedKiller"
- Humanoid41.Parent = Model0
- Humanoid41.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
- Humanoid41.Health = 500
- Humanoid41.HealthDisplayDistance = 0
- Humanoid41.JumpPower = 60
- Humanoid41.LeftLeg = Part39
- Humanoid41.MaxHealth = 500
- Humanoid41.MaxSlopeAngle = 89.900001525879
- Humanoid41.NameDisplayDistance = 0
- Humanoid41.NameOcclusion = Enum.NameOcclusion.EnemyOcclusion
- Humanoid41.RightLeg = Part40
- Humanoid41.Torso = Part44
- Humanoid41.maxHealth = 500
- Model42.Name = "Status"
- Model42.Parent = Humanoid41
- Model43.Name = "AvalibleSpawns"
- Model43.Parent = Model42
- Part44.Name = "HumanoidRootPart"
- Part44.Parent = Model0
- Part44.CFrame = CFrame.new(-10.9200058, 3.00000095, 78.230011, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part44.Position = Vector3.new(-10.9200058, 3.00000095, 78.230011)
- Part44.Transparency = 1
- Part44.Size = Vector3.new(2, 2, 1)
- Part44.BottomSurface = Enum.SurfaceType.Smooth
- Part44.CanCollide = false
- Part44.LeftParamA = 0
- Part44.LeftParamB = 0
- Part44.RightParamA = 0
- Part44.RightParamB = 0
- Part44.TopSurface = Enum.SurfaceType.Smooth
- Part44.FormFactor = Enum.FormFactor.Symmetric
- Part44.formFactor = Enum.FormFactor.Symmetric
- Motor6D45.Name = "RootJoint"
- Motor6D45.Parent = Part44
- Motor6D45.MaxVelocity = 0.10000000149012
- Motor6D45.C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- Motor6D45.C1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- Motor6D45.Part0 = Part44
- Motor6D45.Part1 = Part27
- Motor6D45.part1 = Part27
- Script46.Name = "Sound"
- Script46.Parent = Model0
- table.insert(cors,sandbox(Script46,function()
- --[[
- Author: @spotco
- This script creates sounds which are placed under the character head.
- These sounds are used by the "LocalSound" script.
- To modify this script, copy it to your "StarterPlayer/StarterCharacterScripts" folder keeping the same script name ("Sound").
- The default Sound script loaded for every character will then be replaced with your copy of the script.
- ]]--
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local Players = game:GetService("Players")
- local SOUND_EVENT_FOLDER_NAME = "DefaultSoundEvents"
- local DEFAULT_SERVER_SOUND_EVENT_NAME = "DefaultServerSoundEvent"
- local SoundEventFolder = ReplicatedStorage:FindFirstChild(SOUND_EVENT_FOLDER_NAME)
- local DefaultServerSoundEvent = nil
- local useSoundDispatcher = UserSettings():IsUserFeatureEnabled("UserUseSoundDispatcher")
- if useSoundDispatcher then
- if not SoundEventFolder then
- SoundEventFolder = Instance.new("Folder")
- SoundEventFolder.Name = SOUND_EVENT_FOLDER_NAME
- SoundEventFolder.Archivable = false
- SoundEventFolder.Parent = ReplicatedStorage
- end
- DefaultServerSoundEvent = SoundEventFolder:FindFirstChild(DEFAULT_SERVER_SOUND_EVENT_NAME)
- else
- DefaultServerSoundEvent = ReplicatedStorage:FindFirstChild(DEFAULT_SERVER_SOUND_EVENT_NAME)
- end
- if not DefaultServerSoundEvent then
- if useSoundDispatcher then
- DefaultServerSoundEvent = Instance.new("RemoteEvent", SoundEventFolder)
- else
- DefaultServerSoundEvent = Instance.new("RemoteEvent", ReplicatedStorage)
- end
- DefaultServerSoundEvent.Name = DEFAULT_SERVER_SOUND_EVENT_NAME
- DefaultServerSoundEvent.OnServerEvent:Connect(function() end)
- end
- local function CreateNewSound(name, id, looped, pitch, parent)
- local sound = Instance.new("Sound")
- sound.SoundId = id
- sound.Name = name
- sound.archivable = false
- sound.Pitch = pitch
- sound.Looped = looped
- sound.MinDistance = 5
- sound.MaxDistance = 150
- sound.Volume = 0.65
- sound.Parent = parent
- if DefaultServerSoundEvent then
- local CharacterSoundEvent = Instance.new("RemoteEvent", sound)
- CharacterSoundEvent.Name = "CharacterSoundEvent"
- CharacterSoundEvent.OnServerEvent:Connect(function(player, playing, resetPosition)
- if type(playing) ~= "boolean" then
- return
- end
- if type(resetPosition) ~= "boolean" then
- return
- end
- if player.Character ~= script.Parent then
- return
- end
- for _, p in pairs(Players:GetPlayers()) do
- if p ~= player then
- -- Connect to the dispatcher to check if the player has loaded.
- if useSoundDispatcher then
- SoundEventFolder:FindFirstChild("SoundDispatcher"):Fire(p, sound, playing, resetPosition)
- else
- DefaultServerSoundEvent:FireClient(p, sound, playing, resetPosition)
- end
- end
- end
- end)
- end
- return sound
- end
- local head = script.Parent:FindFirstChild("Head")
- if not head then
- error("Sound script parent has no child Head.")
- return
- end
- CreateNewSound("GettingUp", "rbxasset://sounds/action_get_up.mp3", false, 1, head)
- CreateNewSound("Died", "rbxasset://sounds/uuhhh.mp3", false, 1, head)
- CreateNewSound("FreeFalling", "rbxasset://sounds/action_falling.mp3", true, 1, head)
- CreateNewSound("Jumping", "rbxasset://sounds/action_jump.mp3", false, 1, head)
- CreateNewSound("Landing", "rbxasset://sounds/action_jump_land.mp3", false, 1, head)
- CreateNewSound("Splash", "rbxasset://sounds/impact_water.mp3", false, 1, head)
- CreateNewSound("Running", "rbxasset://sounds/action_footsteps_plastic.mp3", true, 1.85, head)
- CreateNewSound("Swimming", "rbxasset://sounds/action_swim.mp3", true, 1.6, head)
- CreateNewSound("Climbing", "rbxasset://sounds/action_footsteps_plastic.mp3", true, 1, head)
- end))
- LocalScript47.Name = "LocalSound"
- LocalScript47.Parent = Script46
- table.insert(cors,sandbox(LocalScript47,function()
- --[[
- Author: @spotco
- This script runs locally for the player of the given humanoid.
- This script triggers humanoid sound play/pause actions locally.
- The Playing/TimePosition properties of Sound objects bypass FilteringEnabled, so this triggers the sound
- immediately for the player and is replicated to all other players.
- This script is optimized to reduce network traffic through minimizing the amount of property replication.
- ]]--
- --All sounds are referenced by this ID
- local SFX = {
- Died = 0;
- Running = 1;
- Swimming = 2;
- Climbing = 3,
- Jumping = 4;
- GettingUp = 5;
- FreeFalling = 6;
- FallingDown = 7;
- Landing = 8;
- Splash = 9;
- }
- local useUpdatedLocalSoundFlag = UserSettings():IsUserFeatureEnabled("UserFixCharacterSoundIssues")
- local Humanoid = nil
- local Head = nil
- --SFX ID to Sound object
- local Sounds = {}
- local SoundService = game:GetService("SoundService")
- local soundEventFolderName = "DefaultSoundEvents"
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local AddCharacterLoadedEvent = nil
- local RemoveCharacterEvent = nil
- local soundEventFolder = ReplicatedStorage:FindFirstChild(soundEventFolderName)
- local useSoundDispatcher = UserSettings():IsUserFeatureEnabled("UserUseSoundDispatcher")
- if useSoundDispatcher then
- if not soundEventFolder then
- soundEventFolder = Instance.new("Folder", ReplicatedStorage)
- soundEventFolder.Name = soundEventFolderName
- soundEventFolder.Archivable = false
- end
- -- Load the RemoveCharacterEvent
- RemoveCharacterEvent = soundEventFolder:FindFirstChild("RemoveCharacterEvent")
- if RemoveCharacterEvent == nil then
- RemoveCharacterEvent = Instance.new("RemoteEvent", soundEventFolder)
- RemoveCharacterEvent.Name = "RemoveCharacterEvent"
- end
- AddCharacterLoadedEvent = soundEventFolder:FindFirstChild("AddCharacterLoadedEvent")
- if AddCharacterLoadedEvent == nil then
- AddCharacterLoadedEvent = Instance.new("RemoteEvent", soundEventFolder)
- AddCharacterLoadedEvent.Name = "AddCharacterLoadedEvent"
- end
- -- Notify the server a new character has been loaded
- AddCharacterLoadedEvent:FireServer()
- -- Notify the sound dispatcher this character has left.
- game.Players.LocalPlayer.CharacterRemoving:connect(function(character)
- RemoveCharacterEvent:FireServer(game.Players.LocalPlayer)
- end)
- end
- do
- local Figure = script.Parent.Parent
- Head = Figure:WaitForChild("Head")
- while not Humanoid do
- for _,NewHumanoid in pairs(Figure:GetChildren()) do
- if NewHumanoid:IsA("Humanoid") then
- Humanoid = NewHumanoid
- break
- end
- end
- if Humanoid then break end
- Figure.ChildAdded:wait()
- end
- Sounds[SFX.Died] = Head:WaitForChild("Died")
- Sounds[SFX.Running] = Head:WaitForChild("Running")
- Sounds[SFX.Swimming] = Head:WaitForChild("Swimming")
- Sounds[SFX.Climbing] = Head:WaitForChild("Climbing")
- Sounds[SFX.Jumping] = Head:WaitForChild("Jumping")
- Sounds[SFX.GettingUp] = Head:WaitForChild("GettingUp")
- Sounds[SFX.FreeFalling] = Head:WaitForChild("FreeFalling")
- Sounds[SFX.Landing] = Head:WaitForChild("Landing")
- Sounds[SFX.Splash] = Head:WaitForChild("Splash")
- local DefaultServerSoundEvent = nil
- if useSoundDispatcher then
- DefaultServerSoundEvent = soundEventFolder:FindFirstChild("DefaultServerSoundEvent")
- else
- DefaultServerSoundEvent = game:GetService("ReplicatedStorage"):FindFirstChild("DefaultServerSoundEvent")
- end
- if DefaultServerSoundEvent then
- DefaultServerSoundEvent.OnClientEvent:connect(function(sound, playing, resetPosition)
- if UserSettings():IsUserFeatureEnabled("UserPlayCharacterLoopSoundWhenFE") then
- if resetPosition and sound.TimePosition ~= 0 then
- sound.TimePosition = 0
- end
- if sound.IsPlaying ~= playing then
- sound.Playing = playing
- end
- else
- if sound.TimePosition ~= 0 then
- sound.TimePosition = 0
- end
- if not sound.IsPlaying then
- sound.Playing = true
- end
- end
- end)
- end
- end
- local IsSoundFilteringEnabled = function()
- return game.Workspace.FilteringEnabled and SoundService.RespectFilteringEnabled
- end
- local Util
- Util = {
- --Define linear relationship between (pt1x,pt2x) and (pt2x,pt2y). Evaluate this at x.
- YForLineGivenXAndTwoPts = function(x,pt1x,pt1y,pt2x,pt2y)
- --(y - y1)/(x - x1) = m
- local m = (pt1y - pt2y) / (pt1x - pt2x)
- --float b = pt1.y - m * pt1.x;
- local b = (pt1y - m * pt1x)
- return m * x + b
- end;
- --Clamps the value of "val" between the "min" and "max"
- Clamp = function(val,min,max)
- return math.min(max,math.max(min,val))
- end;
- --Gets the horizontal (x,z) velocity magnitude of the given part
- HorizontalSpeed = function(Head)
- local hVel = Head.Velocity + Vector3.new(0,-Head.Velocity.Y,0)
- return hVel.magnitude
- end;
- --Gets the vertical (y) velocity magnitude of the given part
- VerticalSpeed = function(Head)
- return math.abs(Head.Velocity.Y)
- end;
- --Setting Playing/TimePosition values directly result in less network traffic than Play/Pause/Resume/Stop
- --If these properties are enabled, use them.
- Play = function(sound)
- if IsSoundFilteringEnabled() then
- sound.CharacterSoundEvent:FireServer(true, true)
- end
- if sound.TimePosition ~= 0 then
- sound.TimePosition = 0
- end
- if not sound.IsPlaying then
- sound.Playing = true
- end
- end;
- Pause = function(sound)
- if UserSettings():IsUserFeatureEnabled("UserPlayCharacterLoopSoundWhenFE") and IsSoundFilteringEnabled() then
- sound.CharacterSoundEvent:FireServer(false, false)
- end
- if sound.IsPlaying then
- sound.Playing = false
- end
- end;
- Resume = function(sound)
- if UserSettings():IsUserFeatureEnabled("UserPlayCharacterLoopSoundWhenFE") and IsSoundFilteringEnabled() then
- sound.CharacterSoundEvent:FireServer(true, false)
- end
- if not sound.IsPlaying then
- sound.Playing = true
- end
- end;
- Stop = function(sound)
- if UserSettings():IsUserFeatureEnabled("UserPlayCharacterLoopSoundWhenFE") and IsSoundFilteringEnabled() then
- sound.CharacterSoundEvent:FireServer(false, true)
- end
- if sound.IsPlaying then
- sound.Playing = false
- end
- if sound.TimePosition ~= 0 then
- sound.TimePosition = 0
- end
- end;
- }
- do
- -- List of all active Looped sounds
- local playingLoopedSounds = {}
- -- Last seen Enum.HumanoidStateType
- local activeState = nil
- local fallSpeed = 0
- -- Verify and set that "sound" is in "playingLoopedSounds".
- function setSoundInPlayingLoopedSounds(sound)
- for i=1, #playingLoopedSounds do
- if playingLoopedSounds[i] == sound then
- return
- end
- end
- table.insert(playingLoopedSounds,sound)
- end
- -- Stop all active looped sounds except parameter "except". If "except" is not passed, all looped sounds will be stopped.
- function stopPlayingLoopedSoundsExcept(except)
- for i=#playingLoopedSounds,1,-1 do
- if playingLoopedSounds[i] ~= except then
- Util.Pause(playingLoopedSounds[i])
- table.remove(playingLoopedSounds,i)
- end
- end
- end
- -- Table of Enum.HumanoidStateType to handling function
- local stateUpdateHandler = {
- [Enum.HumanoidStateType.Dead] = function()
- stopPlayingLoopedSoundsExcept()
- local sound = Sounds[SFX.Died]
- Util.Play(sound)
- end;
- [Enum.HumanoidStateType.RunningNoPhysics] = function(speed)
- stateUpdated(Enum.HumanoidStateType.Running, speed)
- end;
- [Enum.HumanoidStateType.Running] = function(speed)
- local sound = Sounds[SFX.Running]
- stopPlayingLoopedSoundsExcept(sound)
- if(useUpdatedLocalSoundFlag and activeState == Enum.HumanoidStateType.Freefall and fallSpeed > 0.1) then
- -- Play a landing sound if the character dropped from a large distance
- local vol = math.min(1.0, math.max(0.0, (fallSpeed - 50) / 110))
- local freeFallSound = Sounds[SFX.FreeFalling]
- freeFallSound.Volume = vol
- Util.Play(freeFallSound)
- fallSpeed = 0
- end
- if useUpdatedLocalSoundFlag then
- if speed ~= nil and speed > 0.5 then
- Util.Resume(sound)
- setSoundInPlayingLoopedSounds(sound)
- elseif speed ~= nil then
- stopPlayingLoopedSoundsExcept()
- end
- else
- if Util.HorizontalSpeed(Head) > 0.5 then
- Util.Resume(sound)
- setSoundInPlayingLoopedSounds(sound)
- else
- stopPlayingLoopedSoundsExcept()
- end
- end
- end;
- [Enum.HumanoidStateType.Swimming] = function(speed)
- local threshold
- if useUpdatedLocalSoundFlag then threshold = speed else threshold = Util.VerticalSpeed(Head) end
- if activeState ~= Enum.HumanoidStateType.Swimming and threshold > 0.1 then
- local splashSound = Sounds[SFX.Splash]
- splashSound.Volume = Util.Clamp(
- Util.YForLineGivenXAndTwoPts(
- Util.VerticalSpeed(Head),
- 100, 0.28,
- 350, 1),
- 0,1)
- Util.Play(splashSound)
- end
- do
- local sound = Sounds[SFX.Swimming]
- stopPlayingLoopedSoundsExcept(sound)
- Util.Resume(sound)
- setSoundInPlayingLoopedSounds(sound)
- end
- end;
- [Enum.HumanoidStateType.Climbing] = function(speed)
- local sound = Sounds[SFX.Climbing]
- if useUpdatedLocalSoundFlag then
- if speed ~= nil and math.abs(speed) > 0.1 then
- Util.Resume(sound)
- stopPlayingLoopedSoundsExcept(sound)
- else
- Util.Pause(sound)
- stopPlayingLoopedSoundsExcept(sound)
- end
- else
- if Util.VerticalSpeed(Head) > 0.1 then
- Util.Resume(sound)
- stopPlayingLoopedSoundsExcept(sound)
- else
- stopPlayingLoopedSoundsExcept()
- end
- end
- setSoundInPlayingLoopedSounds(sound)
- end;
- [Enum.HumanoidStateType.Jumping] = function()
- if activeState == Enum.HumanoidStateType.Jumping then
- return
- end
- stopPlayingLoopedSoundsExcept()
- local sound = Sounds[SFX.Jumping]
- Util.Play(sound)
- end;
- [Enum.HumanoidStateType.GettingUp] = function()
- stopPlayingLoopedSoundsExcept()
- local sound = Sounds[SFX.GettingUp]
- Util.Play(sound)
- end;
- [Enum.HumanoidStateType.Freefall] = function()
- if activeState == Enum.HumanoidStateType.Freefall then
- return
- end
- local sound = Sounds[SFX.FreeFalling]
- sound.Volume = 0
- stopPlayingLoopedSoundsExcept()
- fallSpeed = math.max(fallSpeed, math.abs(Head.Velocity.y))
- end;
- [Enum.HumanoidStateType.FallingDown] = function()
- stopPlayingLoopedSoundsExcept()
- end;
- [Enum.HumanoidStateType.Landed] = function()
- stopPlayingLoopedSoundsExcept()
- if Util.VerticalSpeed(Head) > 75 then
- local landingSound = Sounds[SFX.Landing]
- landingSound.Volume = Util.Clamp(
- Util.YForLineGivenXAndTwoPts(
- Util.VerticalSpeed(Head),
- 50, 0,
- 100, 1),
- 0,1)
- Util.Play(landingSound)
- end
- end;
- [Enum.HumanoidStateType.Seated] = function()
- stopPlayingLoopedSoundsExcept()
- end;
- }
- -- Handle state event fired or OnChange fired
- function stateUpdated(state, speed)
- if stateUpdateHandler[state] ~= nil then
- if useUpdatedLocalSoundFlag and (state == Enum.HumanoidStateType.Running
- or state == Enum.HumanoidStateType.Climbing
- or state == Enum.HumanoidStateType.Swimming
- or state == Enum.HumanoidStateType.RunningNoPhysics) then
- stateUpdateHandler[state](speed)
- else
- stateUpdateHandler[state]()
- end
- end
- activeState = state
- end
- Humanoid.Died:connect( function() stateUpdated(Enum.HumanoidStateType.Dead) end)
- Humanoid.Running:connect( function(speed) stateUpdated(Enum.HumanoidStateType.Running, speed) end)
- Humanoid.Swimming:connect( function(speed) stateUpdated(Enum.HumanoidStateType.Swimming, speed) end)
- Humanoid.Climbing:connect( function(speed) stateUpdated(Enum.HumanoidStateType.Climbing, speed) end)
- Humanoid.Jumping:connect( function() stateUpdated(Enum.HumanoidStateType.Jumping) end)
- Humanoid.GettingUp:connect( function() stateUpdated(Enum.HumanoidStateType.GettingUp) end)
- Humanoid.FreeFalling:connect( function() stateUpdated(Enum.HumanoidStateType.Freefall) end)
- Humanoid.FallingDown:connect( function() stateUpdated(Enum.HumanoidStateType.FallingDown) end)
- -- required for proper handling of Landed event
- Humanoid.StateChanged:connect(function(old, new)
- stateUpdated(new)
- end)
- function onUpdate(stepDeltaSeconds, tickSpeedSeconds)
- local stepScale = stepDeltaSeconds / tickSpeedSeconds
- do
- local sound = Sounds[SFX.FreeFalling]
- if activeState == Enum.HumanoidStateType.Freefall then
- if Head.Velocity.Y < 0 and Util.VerticalSpeed(Head) > 75 then
- Util.Resume(sound)
- --Volume takes 1.1 seconds to go from volume 0 to 1
- local ANIMATION_LENGTH_SECONDS = 1.1
- local normalizedIncrement = tickSpeedSeconds / ANIMATION_LENGTH_SECONDS
- sound.Volume = Util.Clamp(sound.Volume + normalizedIncrement * stepScale, 0, 1)
- else
- sound.Volume = 0
- end
- else
- Util.Pause(sound)
- end
- end
- do
- local sound = Sounds[SFX.Running]
- if activeState == Enum.HumanoidStateType.Running then
- if Util.HorizontalSpeed(Head) < 0.5 then
- Util.Pause(sound)
- end
- end
- end
- end
- local lastTick = tick()
- local TICK_SPEED_SECONDS = 0.25
- while true do
- onUpdate(tick() - lastTick,TICK_SPEED_SECONDS)
- lastTick = tick()
- wait(TICK_SPEED_SECONDS)
- end
- end
- end))
- Script48.Name = "Health"
- Script48.Parent = Model0
- table.insert(cors,sandbox(Script48,function()
- -- Gradually regenerates the Humanoid's Health over time.
- local REGEN_RATE = 1/100 -- Regenerate this fraction of MaxHealth per second.
- local REGEN_STEP = 1 -- Wait this long between each regeneration step.
- --------------------------------------------------------------------------------
- local Character = script.Parent
- local Humanoid = Character:WaitForChild'Humanoid'
- --------------------------------------------------------------------------------
- while true do
- while Humanoid.Health < Humanoid.MaxHealth do
- local dt = wait(REGEN_STEP)
- local dh = dt*REGEN_RATE*Humanoid.MaxHealth
- Humanoid.Health = math.min(Humanoid.Health + dh, Humanoid.MaxHealth)
- end
- Humanoid.HealthChanged:Wait()
- end
- end))
- Accessory49.Name = "HappyMask"
- Accessory49.Parent = Model0
- Accessory49.AttachmentPoint = CFrame.new(0, 0.5, 0.600000024, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Accessory49.AttachmentPos = Vector3.new(0, 0.5, 0.600000024)
- Part50.Name = "Handle"
- Part50.Parent = Accessory49
- 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)
- Part50.Position = Vector3.new(-10.9200058, 4.50000095, 77.6302795)
- Part50.Size = Vector3.new(1, 1, 1)
- Part50.BottomSurface = Enum.SurfaceType.Smooth
- Part50.CanCollide = false
- Part50.TopSurface = Enum.SurfaceType.Smooth
- Part50.FormFactor = Enum.FormFactor.Symmetric
- Part50.formFactor = Enum.FormFactor.Symmetric
- SpecialMesh51.Parent = Part50
- SpecialMesh51.MeshId = "http://www.roblox.com/asset/?id=13520257"
- SpecialMesh51.Scale = Vector3.new(1.10000002, 1, 1)
- SpecialMesh51.TextureId = "http://www.roblox.com/asset/?id=13520260"
- SpecialMesh51.MeshType = Enum.MeshType.FileMesh
- Vector3Value52.Name = "OriginalSize"
- Vector3Value52.Parent = Part50
- Vector3Value52.Value = Vector3.new(1, 1, 1)
- Weld53.Name = "AccessoryWeld"
- Weld53.Parent = Part50
- 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)
- Weld53.C1 = CFrame.new(0, 0, -0.600000024, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld53.Part0 = Part50
- Weld53.Part1 = Part1
- Weld53.part1 = Part1
- BodyColors54.Parent = Model0
- BodyColors54.HeadColor = BrickColor.new("Institutional white")
- BodyColors54.HeadColor3 = Color3.new(0.972549, 0.972549, 0.972549)
- BodyColors54.LeftArmColor = BrickColor.new("Institutional white")
- BodyColors54.LeftArmColor3 = Color3.new(0.972549, 0.972549, 0.972549)
- BodyColors54.LeftLegColor = BrickColor.new("Institutional white")
- BodyColors54.LeftLegColor3 = Color3.new(0.972549, 0.972549, 0.972549)
- BodyColors54.RightArmColor = BrickColor.new("Institutional white")
- BodyColors54.RightArmColor3 = Color3.new(0.972549, 0.972549, 0.972549)
- BodyColors54.RightLegColor = BrickColor.new("Institutional white")
- BodyColors54.RightLegColor3 = Color3.new(0.972549, 0.972549, 0.972549)
- BodyColors54.TorsoColor = BrickColor.new("Institutional white")
- BodyColors54.TorsoColor3 = Color3.new(0.972549, 0.972549, 0.972549)
- Accessory55.Name = "Reindeernose"
- Accessory55.Parent = Model0
- Accessory55.AttachmentPoint = CFrame.new(0, 1.79999995, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Accessory55.AttachmentPos = Vector3.new(0, 1.79999995, 0)
- Part56.Name = "Handle"
- Part56.Parent = Accessory55
- 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)
- Part56.Position = Vector3.new(-10.9200058, 4.55000114, 77.480011)
- Part56.Size = Vector3.new(2.31002712, 0.70999819, 1.91000271)
- Part56.BottomSurface = Enum.SurfaceType.Smooth
- Part56.CanCollide = false
- Part56.TopSurface = Enum.SurfaceType.Smooth
- Part56.FormFactor = Enum.FormFactor.Custom
- Part56.formFactor = Enum.FormFactor.Custom
- SpecialMesh57.Parent = Part56
- SpecialMesh57.MeshId = "rbxassetid://1241066615"
- SpecialMesh57.TextureId = "rbxassetid://1241066960"
- SpecialMesh57.MeshType = Enum.MeshType.FileMesh
- Vector3Value58.Name = "OriginalSize"
- Vector3Value58.Parent = Part56
- Vector3Value58.Value = Vector3.new(2.31002712, 0.70999819, 1.91000271)
- Weld59.Name = "AccessoryWeld"
- Weld59.Parent = Part56
- 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)
- Weld59.Part0 = Part56
- Weld59.Part1 = Part1
- Weld59.part1 = Part1
- Camera60.Name = "ThumbnailCamera"
- Camera60.Parent = Accessory55
- 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)
- 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)
- Camera60.Focus = CFrame.new(0.338540912, 0.216563046, 0.336717606, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Camera60.focus = CFrame.new(0.338540912, 0.216563046, 0.336717606, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Pants61.Name = "Pants"
- Pants61.Parent = Model0
- Pants61.PantsTemplate = "http://www.roblox.com/asset/?id=1319012848"
- ShirtGraphic62.Parent = Model0
- ShirtGraphic62.Graphic = "http://www.roblox.com/asset/?id=1166033059"
- CharacterMesh63.Name = "Slinger Left Arm"
- CharacterMesh63.Parent = Model0
- CharacterMesh63.BodyPart = Enum.BodyPart.LeftArm
- CharacterMesh63.MeshId = 32331863
- CharacterMesh64.Name = "Slinger Left Leg"
- CharacterMesh64.Parent = Model0
- CharacterMesh64.BodyPart = Enum.BodyPart.LeftLeg
- CharacterMesh64.MeshId = 32331927
- Animation65.Name = "Swing"
- Animation65.Parent = Model0
- Animation65.AnimationId = "http://www.roblox.com/Asset?ID=89134792"
- Accessory66.Name = "Clown"
- Accessory66.Parent = Model0
- Accessory66.AttachmentPoint = CFrame.new(0, 0.649999976, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Accessory66.AttachmentPos = Vector3.new(0, 0.649999976, 0)
- Part67.Name = "Handle"
- Part67.Parent = Accessory66
- Part67.CFrame = CFrame.new(-10.9200058, 4.35000086, 78.230011, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part67.Position = Vector3.new(-10.9200058, 4.35000086, 78.230011)
- Part67.Size = Vector3.new(2, 2, 2)
- Part67.BottomSurface = Enum.SurfaceType.Smooth
- Part67.CanCollide = false
- Part67.TopSurface = Enum.SurfaceType.Smooth
- Part67.FormFactor = Enum.FormFactor.Symmetric
- Part67.formFactor = Enum.FormFactor.Symmetric
- SpecialMesh68.Parent = Part67
- SpecialMesh68.MeshId = "http://www.roblox.com/asset/?id=15393031"
- SpecialMesh68.TextureId = "http://www.roblox.com/asset/?id=15393013"
- SpecialMesh68.MeshType = Enum.MeshType.FileMesh
- Vector3Value69.Name = "OriginalSize"
- Vector3Value69.Parent = Part67
- Vector3Value69.Value = Vector3.new(2, 2, 2)
- Shirt70.Name = "Shirt"
- Shirt70.Parent = Model0
- Shirt70.ShirtTemplate = "http://www.roblox.com/asset/?id=1187657282"
- CharacterMesh71.Name = "Slinger Right Arm"
- CharacterMesh71.Parent = Model0
- CharacterMesh71.BodyPart = Enum.BodyPart.RightArm
- CharacterMesh71.MeshId = 32331968
- CharacterMesh72.Name = "Slinger Torso"
- CharacterMesh72.Parent = Model0
- CharacterMesh72.BodyPart = Enum.BodyPart.Torso
- CharacterMesh72.MeshId = 32332055
- Script73.Name = "AnimateSauce"
- Script73.Parent = Model0
- table.insert(cors,sandbox(Script73,function()
- function waitForChild(parent, childName)
- local child = parent:findFirstChild(childName)
- if child then return child end
- while true do
- child = parent.ChildAdded:wait()
- if child.Name==childName then return child end
- end
- end
- local Figure = script.Parent
- local Torso = waitForChild(Figure, "Torso")
- local RightShoulder = waitForChild(Torso, "Right Shoulder")
- local LeftShoulder = waitForChild(Torso, "Left Shoulder")
- local RightHip = waitForChild(Torso, "Right Hip")
- local LeftHip = waitForChild(Torso, "Left Hip")
- local Neck = waitForChild(Torso, "Neck")
- local Humanoid;
- for _,Child in pairs(Figure:GetChildren())do
- if Child and Child.ClassName=="Humanoid"then
- Humanoid=Child;
- end;
- end;
- local pose = "Standing"
- local currentAnim = ""
- local currentAnimInstance = nil
- local currentAnimTrack = nil
- local currentAnimKeyframeHandler = nil
- local currentAnimSpeed = 1.0
- local animTable = {}
- local animNames = {
- idle = {
- { id = "http://www.roblox.com/asset/?id=180435571", weight = 9 },
- { id = "http://www.roblox.com/asset/?id=180435792", weight = 1 }
- },
- walk = {
- { id = "http://www.roblox.com/asset/?id=180426354", weight = 10 }
- },
- run = {
- { id = "http://www.roblox.com/asset/?id=252557606", weight = 20 }
- },
- jump = {
- { id = "http://www.roblox.com/asset/?id=125750702", weight = 10 }
- },
- fall = {
- { id = "http://www.roblox.com/asset/?id=180436148", weight = 10 }
- },
- climb = {
- { id = "http://www.roblox.com/asset/?id=180436334", weight = 10 }
- },
- sit = {
- { id = "http://www.roblox.com/asset/?id=178130996", weight = 10 }
- },
- toolnone = {
- { id = "http://www.roblox.com/asset/?id=182393478", weight = 10 }
- },
- toolslash = {
- { id = "http://www.roblox.com/asset/?id=129967390", weight = 10 }
- --{ id = "slash.xml", weight = 10 }
- },
- toollunge = {
- { id = "http://www.roblox.com/asset/?id=129967478", weight = 10 }
- },
- wave = {
- { id = "http://www.roblox.com/asset/?id=128777973", weight = 10 }
- },
- point = {
- { id = "http://www.roblox.com/asset/?id=128853357", weight = 10 }
- },
- dance1 = {
- { id = "http://www.roblox.com/asset/?id=182435998", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491037", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491065", weight = 10 }
- },
- dance2 = {
- { id = "http://www.roblox.com/asset/?id=182436842", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491248", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491277", weight = 10 }
- },
- dance3 = {
- { id = "http://www.roblox.com/asset/?id=182436935", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491368", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491423", weight = 10 }
- },
- laugh = {
- { id = "http://www.roblox.com/asset/?id=129423131", weight = 10 }
- },
- cheer = {
- { id = "http://www.roblox.com/asset/?id=129423030", weight = 10 }
- },
- }
- local dances = {"dance1", "dance2", "dance3"}
- -- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
- local emoteNames = { wave = false, point = false, dance1 = true, dance2 = true, dance3 = true, laugh = false, cheer = false}
- function configureAnimationSet(name, fileList)
- if (animTable[name] ~= nil) then
- for _, connection in pairs(animTable[name].connections) do
- connection:disconnect()
- end
- end
- animTable[name] = {}
- animTable[name].count = 0
- animTable[name].totalWeight = 0
- animTable[name].connections = {}
- -- check for config values
- local config = script:FindFirstChild(name)
- if (config ~= nil) then
- --print("Loading anims " .. name)
- table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
- table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
- local idx = 1
- for _, childPart in pairs(config:GetChildren()) do
- if (childPart:IsA("Animation")) then
- table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
- animTable[name][idx] = {}
- animTable[name][idx].anim = childPart
- local weightObject = childPart:FindFirstChild("Weight")
- if (weightObject == nil) then
- animTable[name][idx].weight = 1
- else
- animTable[name][idx].weight = weightObject.Value
- end
- animTable[name].count = animTable[name].count + 1
- animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
- --print(name .. " [" .. idx .. "] " .. animTable[name][idx].anim.AnimationId .. " (" .. animTable[name][idx].weight .. ")")
- idx = idx + 1
- end
- end
- end
- -- fallback to defaults
- if (animTable[name].count <= 0) then
- for idx, anim in pairs(fileList) do
- animTable[name][idx] = {}
- animTable[name][idx].anim = Instance.new("Animation")
- animTable[name][idx].anim.Name = name
- animTable[name][idx].anim.AnimationId = anim.id
- animTable[name][idx].weight = anim.weight
- animTable[name].count = animTable[name].count + 1
- animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
- --print(name .. " [" .. idx .. "] " .. anim.id .. " (" .. anim.weight .. ")")
- end
- end
- end
- -- Setup animation objects
- function scriptChildModified(child)
- local fileList = animNames[child.Name]
- if (fileList ~= nil) then
- configureAnimationSet(child.Name, fileList)
- end
- end
- script.ChildAdded:connect(scriptChildModified)
- script.ChildRemoved:connect(scriptChildModified)
- for name, fileList in pairs(animNames) do
- configureAnimationSet(name, fileList)
- end
- -- ANIMATION
- -- declarations
- local toolAnim = "None"
- local toolAnimTime = 0
- local jumpAnimTime = 0
- local jumpAnimDuration = 0.3
- local toolTransitionTime = 0.1
- local fallTransitionTime = 0.3
- local jumpMaxLimbVelocity = 0.75
- -- functions
- function stopAllAnimations()
- local oldAnim = currentAnim
- -- return to idle if finishing an emote
- if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
- oldAnim = "idle"
- end
- currentAnim = ""
- currentAnimInstance = nil
- if (currentAnimKeyframeHandler ~= nil) then
- currentAnimKeyframeHandler:disconnect()
- end
- if (currentAnimTrack ~= nil) then
- currentAnimTrack:Stop()
- currentAnimTrack:Destroy()
- currentAnimTrack = nil
- end
- return oldAnim
- end
- function setAnimationSpeed(speed)
- if speed ~= currentAnimSpeed then
- currentAnimSpeed = speed
- currentAnimTrack:AdjustSpeed(currentAnimSpeed)
- end
- end
- function keyFrameReachedFunc(frameName)
- if (frameName == "End") then
- local repeatAnim = currentAnim
- -- return to idle if finishing an emote
- if (emoteNames[repeatAnim] ~= nil and emoteNames[repeatAnim] == false) then
- repeatAnim = "idle"
- end
- local animSpeed = currentAnimSpeed
- playAnimation(repeatAnim, 0.0, Humanoid)
- setAnimationSpeed(animSpeed)
- end
- end
- -- Preload animations
- function playAnimation(animName, transitionTime, humanoid)
- local roll = math.random(1, animTable[animName].totalWeight)
- local origRoll = roll
- local idx = 1
- while (roll > animTable[animName][idx].weight) do
- roll = roll - animTable[animName][idx].weight
- idx = idx + 1
- end
- --print(animName .. " " .. idx .. " [" .. origRoll .. "]")
- local anim = animTable[animName][idx].anim
- -- switch animation
- if (anim ~= currentAnimInstance) then
- if (currentAnimTrack ~= nil) then
- currentAnimTrack:Stop(transitionTime)
- currentAnimTrack:Destroy()
- end
- currentAnimSpeed = 1.0
- -- load it to the humanoid; get AnimationTrack
- currentAnimTrack = humanoid:LoadAnimation(anim)
- -- play the animation
- currentAnimTrack:Play(transitionTime)
- currentAnim = animName
- currentAnimInstance = anim
- -- set up keyframe name triggers
- if (currentAnimKeyframeHandler ~= nil) then
- currentAnimKeyframeHandler:disconnect()
- end
- currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
- end
- end
- -------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------
- local toolAnimName = ""
- local toolAnimTrack = nil
- local toolAnimInstance = nil
- local currentToolAnimKeyframeHandler = nil
- function toolKeyFrameReachedFunc(frameName)
- if (frameName == "End") then
- --print("Keyframe : ".. frameName)
- playToolAnimation(toolAnimName, 0.0, Humanoid)
- end
- end
- function playToolAnimation(animName, transitionTime, humanoid)
- local roll = math.random(1, animTable[animName].totalWeight)
- local origRoll = roll
- local idx = 1
- while (roll > animTable[animName][idx].weight) do
- roll = roll - animTable[animName][idx].weight
- idx = idx + 1
- end
- --print(animName .. " * " .. idx .. " [" .. origRoll .. "]")
- local anim = animTable[animName][idx].anim
- if (toolAnimInstance ~= anim) then
- if (toolAnimTrack ~= nil) then
- toolAnimTrack:Stop()
- toolAnimTrack:Destroy()
- transitionTime = 0
- end
- -- load it to the humanoid; get AnimationTrack
- toolAnimTrack = humanoid:LoadAnimation(anim)
- -- play the animation
- toolAnimTrack:Play(transitionTime)
- toolAnimName = animName
- toolAnimInstance = anim
- currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc)
- end
- end
- function stopToolAnimations()
- local oldAnim = toolAnimName
- if (currentToolAnimKeyframeHandler ~= nil) then
- currentToolAnimKeyframeHandler:disconnect()
- end
- toolAnimName = ""
- toolAnimInstance = nil
- if (toolAnimTrack ~= nil) then
- toolAnimTrack:Stop()
- toolAnimTrack:Destroy()
- toolAnimTrack = nil
- end
- return oldAnim
- end
- -------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------
- function onRunning(speed)
- if speed>0.01 then
- if Figure and Humanoid and Humanoid.WalkSpeed<17 then
- playAnimation("walk", 0.1, Humanoid);
- elseif Figure and Humanoid and Humanoid.WalkSpeed>17 then
- playAnimation("run", 0.1, Humanoid);
- end;
- if currentAnimInstance and currentAnimInstance.AnimationId == "http://www.roblox.com/asset/?id=180426354" then
- setAnimationSpeed(speed / 14.5)
- end
- pose = "Running"
- else
- playAnimation("idle", 0.1, Humanoid)
- pose = "Standing"
- end
- end
- function onDied()
- pose = "Dead"
- end
- function onJumping()
- playAnimation("jump", 0.1, Humanoid)
- jumpAnimTime = jumpAnimDuration
- pose = "Jumping"
- end
- function onClimbing(speed)
- playAnimation("climb", 0.1, Humanoid)
- setAnimationSpeed(speed / 12.0)
- pose = "Climbing"
- end
- function onGettingUp()
- pose = "GettingUp"
- end
- function onFreeFall()
- if (jumpAnimTime <= 0) then
- playAnimation("fall", fallTransitionTime, Humanoid)
- end
- pose = "FreeFall"
- end
- function onFallingDown()
- pose = "FallingDown"
- end
- function onSeated()
- pose = "Seated"
- end
- function onPlatformStanding()
- pose = "PlatformStanding"
- end
- function onSwimming(speed)
- if speed>0 then
- pose = "Running"
- else
- pose = "Standing"
- end
- end
- function getTool()
- for _, kid in ipairs(Figure:GetChildren()) do
- if kid.className == "Tool" then return kid end
- end
- return nil
- end
- function getToolAnim(tool)
- for _, c in ipairs(tool:GetChildren()) do
- if c.Name == "toolanim" and c.className == "StringValue" then
- return c
- end
- end
- return nil
- end
- function animateTool()
- if (toolAnim == "None") then
- playToolAnimation("toolnone", toolTransitionTime, Humanoid)
- return
- end
- if (toolAnim == "Slash") then
- playToolAnimation("toolslash", 0, Humanoid)
- return
- end
- if (toolAnim == "Lunge") then
- playToolAnimation("toollunge", 0, Humanoid)
- return
- end
- end
- function moveSit()
- RightShoulder.MaxVelocity = 0.15
- LeftShoulder.MaxVelocity = 0.15
- RightShoulder:SetDesiredAngle(3.14 /2)
- LeftShoulder:SetDesiredAngle(-3.14 /2)
- RightHip:SetDesiredAngle(3.14 /2)
- LeftHip:SetDesiredAngle(-3.14 /2)
- end
- local lastTick = 0
- function move(time)
- local amplitude = 1
- local frequency = 1
- local deltaTime = time - lastTick
- lastTick = time
- local climbFudge = 0
- local setAngles = false
- if (jumpAnimTime > 0) then
- jumpAnimTime = jumpAnimTime - deltaTime
- end
- if (pose == "FreeFall" and jumpAnimTime <= 0) then
- playAnimation("fall", fallTransitionTime, Humanoid)
- elseif (pose == "Seated") then
- playAnimation("sit", 0.5, Humanoid)
- return
- elseif (pose == "Running") then
- if Figure and Humanoid and Humanoid.WalkSpeed<17 then
- playAnimation("walk", 0.1, Humanoid);
- elseif Figure and Humanoid and Humanoid.WalkSpeed>17 then
- playAnimation("run", 0.1, Humanoid);
- end;
- elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
- stopAllAnimations()
- amplitude = 0.1
- frequency = 1
- setAngles = true
- end
- if (setAngles) then
- local desiredAngle = amplitude * math.sin(time * frequency)
- RightShoulder:SetDesiredAngle(desiredAngle + climbFudge)
- LeftShoulder:SetDesiredAngle(desiredAngle - climbFudge)
- RightHip:SetDesiredAngle(-desiredAngle)
- LeftHip:SetDesiredAngle(-desiredAngle)
- end
- -- Tool Animation handling
- local tool = getTool()
- if tool and tool:FindFirstChild("Handle") then
- local animStringValueObject = getToolAnim(tool)
- if animStringValueObject then
- toolAnim = animStringValueObject.Value
- -- message recieved, delete StringValue
- animStringValueObject.Parent = nil
- toolAnimTime = time + .3
- end
- if time > toolAnimTime then
- toolAnimTime = 0
- toolAnim = "None"
- end
- animateTool()
- else
- stopToolAnimations()
- toolAnim = "None"
- toolAnimInstance = nil
- toolAnimTime = 0
- end
- end
- -- connect events
- Humanoid.Died:connect(onDied)
- Humanoid.Running:connect(onRunning)
- Humanoid.Jumping:connect(onJumping)
- Humanoid.Climbing:connect(onClimbing)
- Humanoid.GettingUp:connect(onGettingUp)
- Humanoid.FreeFalling:connect(onFreeFall)
- Humanoid.FallingDown:connect(onFallingDown)
- Humanoid.Seated:connect(onSeated)
- Humanoid.PlatformStanding:connect(onPlatformStanding)
- Humanoid.Swimming:connect(onSwimming)
- local runService = game:GetService("RunService");
- playAnimation("idle", 0.1, Humanoid)
- pose = "Standing"
- while Wait(0)do
- local _,time=wait(0)
- move(time)
- end
- end))
- StringValue74.Name = "climb"
- StringValue74.Parent = Script73
- Animation75.Name = "ClimbAnim"
- Animation75.Parent = StringValue74
- Animation75.AnimationId = "http://www.roblox.com/asset/?id=180436334"
- StringValue76.Name = "fall"
- StringValue76.Parent = Script73
- Animation77.Name = "FallAnim"
- Animation77.Parent = StringValue76
- Animation77.AnimationId = "http://www.roblox.com/asset/?id=180436148"
- StringValue78.Name = "idle"
- StringValue78.Parent = Script73
- Animation79.Name = "Animation1"
- Animation79.Parent = StringValue78
- Animation79.AnimationId = "http://www.roblox.com/asset/?id=180435571"
- NumberValue80.Name = "Weight"
- NumberValue80.Parent = Animation79
- NumberValue80.Value = 9
- Animation81.Name = "Animation2"
- Animation81.Parent = StringValue78
- Animation81.AnimationId = "http://www.roblox.com/asset/?id=180435792"
- NumberValue82.Name = "Weight"
- NumberValue82.Parent = Animation81
- NumberValue82.Value = 1
- StringValue83.Name = "jump"
- StringValue83.Parent = Script73
- Animation84.Name = "JumpAnim"
- Animation84.Parent = StringValue83
- Animation84.AnimationId = "http://www.roblox.com/asset/?id=125750702"
- StringValue85.Name = "run"
- StringValue85.Parent = Script73
- Animation86.Name = "RunAnim"
- Animation86.Parent = StringValue85
- Animation86.AnimationId = "http://www.roblox.com/asset/?id=252557606"
- StringValue87.Name = "sit"
- StringValue87.Parent = Script73
- Animation88.Name = "SitAnim"
- Animation88.Parent = StringValue87
- Animation88.AnimationId = "http://www.roblox.com/asset/?id=178130996"
- StringValue89.Name = "toolnone"
- StringValue89.Parent = Script73
- Animation90.Name = "ToolNoneAnim"
- Animation90.Parent = StringValue89
- Animation90.AnimationId = "http://www.roblox.com/asset/?id=182393478"
- StringValue91.Name = "walk"
- StringValue91.Parent = Script73
- Animation92.Name = "WalkAnim"
- Animation92.Parent = StringValue91
- Animation92.AnimationId = "http://www.roblox.com/asset/?id=180426354"
- Script93.Name = "Health"
- Script93.Parent = Model0
- table.insert(cors,sandbox(Script93,function()
- --Responsible for regening a player's humanoid's health
- -- declarations
- local Figure = script.Parent
- local Head = Figure:WaitForChild("Head")
- local Humanoid;
- for _,Child in pairs(Figure:GetChildren())do
- if Child and Child.ClassName=="Humanoid"then
- Humanoid=Child;
- end;
- end;
- local regening = false
- -- regeneration
- function regenHealth()
- if regening then return end
- regening = true
- while Humanoid.Health < Humanoid.MaxHealth do
- local s = wait(1)
- local health = Humanoid.Health
- if health~=0 and health < Humanoid.MaxHealth then
- local newHealthDelta = 0.01 * s * Humanoid.MaxHealth
- health = health + newHealthDelta
- Humanoid.Health = math.min(health,Humanoid.MaxHealth)
- end
- end
- if Humanoid.Health > Humanoid.MaxHealth then
- Humanoid.Health = Humanoid.MaxHealth
- end
- regening = false
- end
- Humanoid.HealthChanged:connect(regenHealth)
- end))
- Script94.Name = "JeffTheKillerMain"
- Script94.Parent = Model0
- table.insert(cors,sandbox(Script94,function()
- --[[ By: Brutez. ]]--
- local JeffTheKillerScript=script;
- repeat Wait(0)until JeffTheKillerScript and JeffTheKillerScript.Parent and JeffTheKillerScript.Parent.ClassName=="Model"and JeffTheKillerScript.Parent:FindFirstChild("Head")and JeffTheKillerScript.Parent:FindFirstChild("Torso");
- local JeffTheKiller=JeffTheKillerScript.Parent;
- function raycast(Spos,vec,currentdist)
- local hit2,pos2=game.Workspace:FindPartOnRay(Ray.new(Spos+(vec*.05),vec*currentdist),JeffTheKiller);
- if hit2~=nil and pos2 then
- if hit2.Name=="Handle" and not hit2.CanCollide or string.sub(hit2.Name,1,6)=="Effect"and not hit2.CanCollide then
- local currentdist=currentdist-(pos2-Spos).magnitude;
- return raycast(pos2,vec,currentdist);
- end;
- end;
- return hit2,pos2;
- end;
- function RayCast(Position,Direction,MaxDistance,IgnoreList)
- return Game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(Position,Direction.unit*(MaxDistance or 999.999)),IgnoreList);
- end;
- --[[if JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Thumbnail")then]]--
- --[[JeffTheKiller:FindFirstChild("Thumbnail"):Destroy();]]--
- --[[end;]]--
- local JeffTheKillerHumanoid;
- for _,Child in pairs(JeffTheKiller:GetChildren())do
- if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
- JeffTheKillerHumanoid=Child;
- end;
- end;
- local AttackDebounce=false;
- local JeffTheKillerKnife=JeffTheKiller:FindFirstChild("Knife");
- local JeffTheKillerHead=JeffTheKiller:FindFirstChild("Head");
- local JeffTheKillerHumanoidRootPart=JeffTheKiller:FindFirstChild("HumanoidRootPart");
- local WalkDebounce=false;
- local Notice=false;
- local JeffLaughDebounce=false;
- local MusicDebounce=false;
- local NoticeDebounce=false;
- local ChosenMusic;
- JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,0,1,0,1,-0);
- local OriginalC0=JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0;
- function FindNearestBae()
- local NoticeDistance=200;
- local TargetMain;
- for _,TargetModel in pairs(Game:GetService("Workspace"):GetChildren())do
- 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
- local TargetPart=TargetModel:FindFirstChild("Torso");
- local FoundHumanoid;
- for _,Child in pairs(TargetModel:GetChildren())do
- if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
- FoundHumanoid=Child;
- end;
- end;
- if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<NoticeDistance then
- TargetMain=TargetPart;
- NoticeDistance=(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude;
- local hit,pos=raycast(JeffTheKillerHumanoidRootPart.Position,(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).unit,500)
- if hit and hit.Parent and hit.Parent.ClassName=="Model"and hit.Parent:FindFirstChild("Torso")and hit.Parent:FindFirstChild("Head")then
- if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<9 and not AttackDebounce then
- Spawn(function()
- AttackDebounce=true;
- local SwingAnimation=JeffTheKillerHumanoid:LoadAnimation(JeffTheKiller:FindFirstChild("Swing"));
- local SwingChoice=math.random(1,2);
- local HitChoice=math.random(1,3);
- SwingAnimation:Play();
- SwingAnimation:AdjustSpeed(3.5+(math.random()*0.3));
- if JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Swing")then
- local SwingSound=JeffTheKillerKnife:FindFirstChild("Swing");
- SwingSound.Pitch=1+(math.random()*0.04);
- SwingSound:Play();
- end;
- Wait(0.3);
- if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<8 then
- FoundHumanoid:TakeDamage(35);
- if HitChoice==1 and JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Hit1")then
- local HitSound=JeffTheKillerKnife:FindFirstChild("Hit1");
- HitSound.Pitch=1+(math.random()*0.04);
- HitSound:Play(91154909);
- elseif HitChoice==2 and JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Hit2")then
- local HitSound=JeffTheKillerKnife:FindFirstChild("Hit2");
- HitSound.Pitch=1+(math.random()*0.04);
- HitSound:Play(91154932);
- elseif HitChoice==3 and JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Hit3")then
- local HitSound=JeffTheKillerKnife:FindFirstChild("Hit3");
- HitSound.Pitch=1+(math.random()*0.04);
- HitSound:Play(91154954);
- end;
- end;
- Wait(0.1);
- AttackDebounce=false;
- end);
- end;
- end;
- end;
- end;
- end;
- return TargetMain;
- end;
- while Wait(0)do
- local TargetPoint=JeffTheKillerHumanoid.TargetPoint;
- 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})
- local Jumpable=false;
- if Blockage then
- Jumpable=true;
- if Blockage and Blockage.Parent and Blockage.Parent.ClassName~="Workspace"then
- local BlockageHumanoid;
- for _,Child in pairs(Blockage.Parent:GetChildren())do
- if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
- BlockageHumanoid=Child;
- end;
- end;
- if Blockage and Blockage:IsA("Terrain")then
- local CellPos=Blockage:WorldToCellPreferSolid((BlockagePos-Vector3.new(0,2,0)));
- local CellMaterial,CellShape,CellOrientation=Blockage:GetCell(CellPos.X,CellPos.Y,CellPos.Z);
- if CellMaterial==Enum.CellMaterial.Water then
- Jumpable=false;
- end;
- 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
- Jumpable=false;
- end;
- end;
- if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and not JeffTheKillerHumanoid.Sit and Jumpable then
- JeffTheKillerHumanoid.Jump=true;
- end;
- end;
- 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
- Spawn(function()
- WalkDebounce=true;
- local FiredRay=Ray.new(JeffTheKillerHumanoidRootPart.Position,Vector3.new(0,-4,0));
- local RayTarget,endPoint=Game:GetService("Workspace"):FindPartOnRay(FiredRay,JeffTheKiller);
- if RayTarget then
- local JeffTheKillerHeadFootStepClone=JeffTheKillerHead:FindFirstChild("Jeff_Step"):Clone();
- JeffTheKillerHeadFootStepClone.Parent=JeffTheKillerHead;
- JeffTheKillerHeadFootStepClone:Play();
- JeffTheKillerHeadFootStepClone:Destroy();
- if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and JeffTheKillerHumanoid.WalkSpeed<17 then
- Wait(0.4);
- elseif JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and JeffTheKillerHumanoid.WalkSpeed>17 then
- Wait(0.15);
- end
- end;
- WalkDebounce=false;
- end);
- end;
- local MainTarget=FindNearestBae();
- local FoundHumanoid;
- if MainTarget then
- for _,Child in pairs(MainTarget.Parent:GetChildren())do
- if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
- FoundHumanoid=Child;
- end;
- end;
- end;
- if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and MainTarget.Parent and FoundHumanoid and FoundHumanoid.Jump then
- JeffTheKillerHumanoid.Jump=true;
- end;
- 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
- if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")and not JeffTheKillerHead:FindFirstChild("Jeff_Laugh").IsPlaying then
- JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=1;
- JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Play();
- end;
- 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
- if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")and JeffTheKillerHead:FindFirstChild("Jeff_Laugh").IsPlaying then
- if not JeffLaughDebounce then
- Spawn(function()
- JeffLaughDebounce=true;
- 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;
- JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=0;
- JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Stop();
- JeffLaughDebounce=false;
- end);
- end;
- end;
- end;
- 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
- local MusicChoice=math.random(1,2);
- if MusicChoice==1 and JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Jeff_Scene_Sound1")then
- ChosenMusic=JeffTheKiller:FindFirstChild("Jeff_Scene_Sound1");
- elseif MusicChoice==2 and JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Jeff_Scene_Sound2")then
- ChosenMusic=JeffTheKiller:FindFirstChild("Jeff_Scene_Sound2");
- end;
- if JeffTheKillerScript and JeffTheKiller and ChosenMusic and not ChosenMusic.IsPlaying then
- ChosenMusic.Volume=0.5;
- ChosenMusic:Play();
- end;
- 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
- if JeffTheKillerScript and JeffTheKiller and ChosenMusic and ChosenMusic.IsPlaying then
- if not MusicDebounce then
- Spawn(function()
- MusicDebounce=true;
- 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;
- if ChosenMusic then
- ChosenMusic.Volume=0;
- ChosenMusic:Stop();
- end;
- ChosenMusic=nil;
- MusicDebounce=false;
- end);
- end;
- end;
- end;
- if not MainTarget and not JeffLaughDebounce then
- Spawn(function()
- JeffLaughDebounce=true;
- 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;
- JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=0;
- JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Stop();
- JeffLaughDebounce=false;
- end);
- end;
- if not MainTarget and not MusicDebounce then
- Spawn(function()
- MusicDebounce=true;
- 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;
- if ChosenMusic then
- ChosenMusic.Volume=0;
- ChosenMusic:Stop();
- end;
- ChosenMusic=nil;
- MusicDebounce=false;
- end);
- end;
- if MainTarget then
- Notice=true;
- if Notice and not NoticeDebounce and JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Susto2")then
- JeffTheKillerHead:FindFirstChild("Jeff_Susto2"):Play(380102473);
- NoticeDebounce=true;
- end
- if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 then
- if MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude>5 then
- JeffTheKillerHumanoid.WalkSpeed=40;
- elseif MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<5 then
- JeffTheKillerHumanoid.WalkSpeed=0.004;
- end;
- JeffTheKillerHumanoid:MoveTo(MainTarget.Position+(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).unit*2,Game:GetService("Workspace"):FindFirstChild("Terrain"));
- local NeckRotation=(JeffTheKiller:FindFirstChild("Torso").Position.Y-MainTarget.Parent:FindFirstChild("Head").Position.Y)/10;
- if NeckRotation>-1.5 and NeckRotation<1.5 then
- JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=OriginalC0*CFrame.fromEulerAnglesXYZ(NeckRotation,0,0);
- end;
- if NeckRotation<-1.5 then
- JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,-0.993636549,0.112633869,0,0.112633869,0.993636549);
- elseif NeckRotation>1.5 then
- JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,0.996671617,0.081521146,0,0.081521146,-0.996671617);
- end;
- else
- end;
- else
- Notice=false;
- NoticeDebounce=false;
- JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,0,1,0,1,-0);
- local RandomWalk=math.random(1,150);
- if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 then
- JeffTheKillerHumanoid.WalkSpeed=12;
- if RandomWalk==1 then
- JeffTheKillerHumanoid:MoveTo(Game:GetService("Workspace"):FindFirstChild("Terrain").Position+Vector3.new(math.random(-2048,2048),0,math.random(-2048,2048)),Game:GetService("Workspace"):FindFirstChild("Terrain"));
- end;
- end;
- end;
- if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid then
- JeffTheKillerHumanoid.DisplayDistanceType="None";
- JeffTheKillerHumanoid.HealthDisplayDistance=0;
- JeffTheKillerHumanoid.Name="ColdBloodedKiller";
- JeffTheKillerHumanoid.NameDisplayDistance=0;
- JeffTheKillerHumanoid.NameOcclusion="EnemyOcclusion";
- JeffTheKillerHumanoid.AutoJumpEnabled=true;
- JeffTheKillerHumanoid.AutoRotate=true;
- JeffTheKillerHumanoid.MaxHealth=700;
- JeffTheKillerHumanoid.JumpPower=60;
- JeffTheKillerHumanoid.MaxSlopeAngle=89.9;
- end;
- if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and not JeffTheKillerHumanoid.AutoJumpEnabled then
- JeffTheKillerHumanoid.AutoJumpEnabled=true;
- end;
- if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and not JeffTheKillerHumanoid.AutoRotate then
- JeffTheKillerHumanoid.AutoRotate=true;
- end;
- if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.PlatformStand then
- JeffTheKillerHumanoid.PlatformStand=false;
- end;
- if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Sit then
- JeffTheKillerHumanoid.Sit=false;
- end;
- end;
- --[[ By: Brutez. ]]--
- end))
- Script95.Name = "Respawn"
- Script95.Parent = Model0
- table.insert(cors,sandbox(Script95,function()
- --[[ By: Brutez, 2/28/2015, 1:34 AM, (UTC-08:00) Pacific Time (US & Canada) ]]--
- 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. ]]--
- local AdvancedRespawnScript=script;
- repeat Wait(0)until script and script.Parent and script.Parent.ClassName=="Model";
- local JeffTheKiller=AdvancedRespawnScript.Parent;
- if AdvancedRespawnScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Thumbnail")then
- JeffTheKiller:FindFirstChild("Thumbnail"):Destroy();
- end;
- local GameDerbis=Game:GetService("Debris");
- local JeffTheKillerHumanoid;
- for _,Child in pairs(JeffTheKiller:GetChildren())do
- if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
- JeffTheKillerHumanoid=Child;
- end;
- end;
- local Respawndant=JeffTheKiller:Clone();
- if PlayerSpawning then --[[ LOOK AT LINE: 2. ]]--
- coroutine.resume(coroutine.create(function()
- if JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid:FindFirstChild("Status")and not JeffTheKillerHumanoid:FindFirstChild("Status"):FindFirstChild("AvalibleSpawns")then
- SpawnModel=Instance.new("Model");
- SpawnModel.Parent=JeffTheKillerHumanoid.Status;
- SpawnModel.Name="AvalibleSpawns";
- else
- SpawnModel=JeffTheKillerHumanoid:FindFirstChild("Status"):FindFirstChild("AvalibleSpawns");
- end;
- function FindSpawn(SearchValue)
- local PartsArchivable=SearchValue:GetChildren();
- for AreaSearch=1,#PartsArchivable do
- if PartsArchivable[AreaSearch].className=="SpawnLocation"then
- local PositionValue=Instance.new("Vector3Value",SpawnModel);
- PositionValue.Value=PartsArchivable[AreaSearch].Position;
- PositionValue.Name=PartsArchivable[AreaSearch].Duration;
- end;
- FindSpawn(PartsArchivable[AreaSearch]);
- end;
- end;
- FindSpawn(Game:GetService("Workspace"));
- local SpawnChilden=SpawnModel:GetChildren();
- if#SpawnChilden>0 then
- local SpawnItself=SpawnChilden[math.random(1,#SpawnChilden)];
- local RespawningForceField=Instance.new("ForceField");
- RespawningForceField.Parent=JeffTheKiller;
- RespawningForceField.Name="SpawnForceField";
- GameDerbis:AddItem(RespawningForceField,SpawnItself.Name);
- JeffTheKiller:MoveTo(SpawnItself.Value+Vector3.new(0,3.5,0));
- else
- if JeffTheKiller:FindFirstChild("SpawnForceField")then
- JeffTheKiller:FindFirstChild("SpawnForceField"):Destroy();
- end;
- JeffTheKiller:MoveTo(Vector3.new(0,115,0));
- end;
- end));
- end;
- function Respawn()
- Wait(5);
- Respawndant.Parent=JeffTheKiller.Parent;
- Respawndant:makeJoints();
- Respawndant:FindFirstChild("Head"):MakeJoints();
- Respawndant:FindFirstChild("Torso"):MakeJoints();
- JeffTheKiller:remove();
- end;
- if AdvancedRespawnScript and JeffTheKiller and JeffTheKillerHumanoid then
- JeffTheKillerHumanoid.Died:connect(Respawn);
- end;
- --[[ By: Brutez, 2/28/2015, 1:34 AM, (UTC-08:00) Pacific Time (US & Canada) ]]--
- end))
- Tool96.Name = "Knife"
- Tool96.Parent = Model0
- Tool96.CanBeDropped = false
- Tool96.Grip = CFrame.new(0, -0.800000012, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Tool96.GripPos = Vector3.new(0, -0.800000012, 0)
- Part97.Name = "Handle"
- Part97.Parent = Tool96
- Part97.CFrame = CFrame.new(-9.4200058, 2.00000095, 77.4300079, 1, 0, 0, 0, 0, 1, 0, -1, 0)
- Part97.Orientation = Vector3.new(-90, 0, 0)
- Part97.Position = Vector3.new(-9.4200058, 2.00000095, 77.4300079)
- Part97.Rotation = Vector3.new(-90, 0, 0)
- Part97.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- Part97.Size = Vector3.new(0.400000006, 3, 0.800000012)
- Part97.BrickColor = BrickColor.new("Really black")
- Part97.CanCollide = false
- Part97.brickColor = BrickColor.new("Really black")
- Part97.FormFactor = Enum.FormFactor.Custom
- Part97.formFactor = Enum.FormFactor.Custom
- Sound98.Parent = Part97
- Sound98.EmitterSize = 0
- Sound98.MinDistance = 0
- Sound98.SoundId = "rbxassetid://153647514"
- Sound98.Volume = 1
- FileMesh99.Parent = Part97
- FileMesh99.MeshId = "http://www.roblox.com/asset/?id=121944778"
- FileMesh99.TextureId = "http://www.roblox.com/asset/?id=121944805 "
- ParticleEmitter100.Parent = Part97
- ParticleEmitter100.Texture = "rbxgameasset://Images/f94bc32398151444678f59982808bc40"
- ParticleEmitter101.Parent = Part97
- ParticleEmitter101.Texture = "rbxgameasset://Images/293e8492b85204768accaaa332b9fed8"
- ParticleEmitter102.Parent = Part97
- ParticleEmitter102.Texture = "rbxgameasset://Images/293e8492b85204768accaaa332b9fed8 (1)"
- ParticleEmitter103.Parent = Part97
- ParticleEmitter103.Texture = "rbxgameasset://Images/91b056cb0d5025d0a11348d19ed53067"
- Sound104.Parent = Part97
- Sound104.EmitterSize = 0
- Sound104.MinDistance = 0
- Sound104.SoundId = "http://www/Illuminati-Theme-item?id=191907895"
- Sound104.Volume = 1
- LocalScript105.Name = "FirstPersonArms"
- LocalScript105.Parent = Tool96
- table.insert(cors,sandbox(LocalScript105,function()
- wait(0.2)
- local player=game.Players.LocalPlayer
- local camera=workspace.CurrentCamera
- local tool=script.Parent
- local char=player.Character
- local humanoid=char:WaitForChild("Humanoid")
- SETTINGS={
- FIRST_PERSON={
- left_arm=true, --if left arm is Enabled
- right_arm=true, --If right arm is Enabled
- arm_transparency=0, --The transparency of the Arms
- 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.
- change_color=false, --Changes the colo(u)r of the arms, If false, Will set them as the Players arm colo(u)r
- add_shirt=true, --If true, add's the Character's shirt to the Arms--
- },
- }
- function FirstPerson()
- if (camera.focus.p - camera.CoordinateFrame.p).magnitude > 1 then
- return false
- else
- return true
- end
- end
- function Start()
- anim_arms=Instance.new("Model")
- anim_arms.Name="Arms_Model"
- local Shirt=player.Character:FindFirstChild("Shirt")
- if Shirt then
- Shirt:clone().Parent=anim_arms
- Instance.new("Humanoid",anim_arms)
- end
- local r,l = char:FindFirstChild("Right Arm"):clone(), char:FindFirstChild("Left Arm"):clone()
- if r and SETTINGS.FIRST_PERSON.right_arm then
- r.Transparency=SETTINGS.FIRST_PERSON.arm_transparency
- r.Material=Enum.Material.SmoothPlastic
- if SETTINGS.FIRST_PERSON.change_color then
- r.BrickColor=SETTINGS.FIRST_PERSON.arm_color
- end
- end
- if l and SETTINGS.FIRST_PERSON.left_arm then
- l.Transparency=SETTINGS.FIRST_PERSON.arm_transparency
- l.Material=Enum.Material.SmoothPlastic
- if SETTINGS.FIRST_PERSON.change_color then
- l.BrickColor=SETTINGS.FIRST_PERSON.arm_color
- end
- end
- local rw,lw = Instance.new("Weld"),Instance.new("Weld")
- if rw and SETTINGS.FIRST_PERSON.right_arm then
- rw.Part0=r
- rw.Part1=char:FindFirstChild("Right Arm")
- rw.Parent=r
- r.Parent=anim_arms
- end
- if lw and SETTINGS.FIRST_PERSON.left_arm then
- lw.Part0=l
- lw.Part1=char:FindFirstChild("Left Arm")
- lw.Parent=l
- l.Parent=anim_arms
- end
- l.CanCollide=false
- r.CanCollide=false
- if SETTINGS.FIRST_PERSON.right_arm then
- if r:FindFirstChild("RightGrip")~=nil then r:FindFirstChild("RightGrip"):Destroy() end
- end
- if tool.Handle:FindFirstChild("Mesh") ~= nil then tool.Handle.Mesh:Destroy() end
- while equipped do
- if FirstPerson() then
- if anim_arms ~= nil then
- anim_arms.Parent=camera
- humanoid.CameraOffset = Vector3.new(0, -0.2, -0.5)
- end
- else
- if anim_arms ~= nil then
- anim_arms.Parent=nil
- humanoid.CameraOffset = Vector3.new(0,0,0)
- end
- end
- wait()
- end
- end
- function End()
- anim_arms:Destroy()
- anim_arms=nil
- humanoid.CameraOffset = Vector3.new(0,0,0)
- end
- tool.Equipped:connect(function ()
- equipped=true
- Start()
- end)
- tool.Unequipped:connect(function ()
- equipped=false
- End()
- end)
- end))
- LocalScript106.Name = "Module"
- LocalScript106.Parent = Tool96
- table.insert(cors,sandbox(LocalScript106,function()
- --Knife Module Script
- --MatrixComplexity
- wait(.2)
- local tool=script.Parent
- local player=game.Players.LocalPlayer
- local char=player.Character
- local humanoid=char:FindFirstChild("Humanoid")
- local camera=workspace.CurrentCamera
- local rightC1 = CFrame.new(-0.5, 0.7, 0) * CFrame.Angles(0, (math.pi / 2), 0)
- local leftC1 = CFrame.new(0, 0.7, 0) * CFrame.Angles(0, (math.pi / 2), 0)
- local mouse=player:GetMouse()
- local equipping=false
- local gettingknife=false
- local laserCharge=false
- local playcharge=false
- local justthrown=false
- local canLaser=false
- local justattacked=false
- local thrownkniferotation=0
- local Damage=110
- local Attacking=false
- local handle=nil
- local WalkSpeeds={16,20}
- SOUNDS={
- throwing={"153647554","153647549"},
- laserthrowing={"138499093"},
- shouts={"241084057","168209314","131076695"},
- striking={"153647529","153647534","153647539","153647540"},
- equip="153647514",
- wallhit={"153647563","153647564"},
- hitplayer={"153647516","153647519","153647522","153647526"},
- deaths={"146594640","146457047","146594648"},
- }
- SETTINGS={
- tool={
- mesh_id="http://www.roblox.com/asset/?id=121944778",
- mesh_type=Enum.MeshType.FileMesh,
- texture_id="http://www.roblox.com/asset/?id=121944805 ",
- mesh_offset=Vector3.new(0,0,0),
- mesh_scale=.9,
- tool_size=Vector3.new(1,1,1),
- tool_transparency=0,
- tool_color=BrickColor.Black(),
- default_tool_size=1,
- },
- }
- function DamageObject(hit)
- local char=hit.Parent
- if char and char~=player.Character and char.Name~="Arms_Model" and hit.Name~="Handle" then
- local h=char:FindFirstChild("Humanoid")
- if h and h.Health > 0 then
- h:TakeDamage(Damage)
- PlaySound("Hit1",char.Torso)
- if h.Health == 0 then
- PlaySound("Hit2",char.Torso)
- end
- end
- end
- end
- function PlaySound(name,ctorso)
- if name=="Throw" then
- tool.Handle.Sound.SoundId = "rbxassetid://" .. SOUNDS.throwing[math.random(1,#SOUNDS.throwing)]
- tool.Handle.Sound:Play()
- elseif name=="ThrowLaser" then
- tool.Handle.Sound.SoundId = "rbxassetid://" .. SOUNDS.laserthrowing[math.random(1,#SOUNDS.laserthrowing)]
- tool.Handle.Sound:Play()
- elseif name=="Equip" then
- tool.Handle.Sound.SoundId = "rbxassetid://" .. SOUNDS.equip
- tool.Handle.Sound:Play()
- elseif name=="Swing" then
- tool.Handle.Sound.SoundId = "rbxassetid://" .. SOUNDS.striking[math.random(1,#SOUNDS.striking)]
- tool.Handle.Sound:Play()
- elseif name=="Hit1" then
- local NewSound=tool.Handle.Sound:clone()
- NewSound.Parent=ctorso
- NewSound.SoundId = "rbxassetid://" .. SOUNDS.hitplayer[math.random(1,#SOUNDS.hitplayer)]
- NewSound:Play()
- NewSound:Destroy()
- elseif name=="Hit2" then
- local NewSound=tool.Handle.Sound:clone()
- NewSound.Parent=ctorso
- NewSound.SoundId = "rbxassetid://" .. SOUNDS.deaths[math.random(1,#SOUNDS.deaths)]
- NewSound:Play()
- NewSound:Destroy()
- elseif name=="Laser" then
- local NewSound=tool.Handle.Sound
- NewSound.SoundId = "rbxassetid://" .. SOUNDS.shouts[math.random(1,#SOUNDS.shouts)]
- NewSound:Play()
- end
- end
- function Throwtool(dPos)
- if not tool.Handle then return end
- local throwingHandle = tool.Handle:Clone()
- game:GetService("Debris"):AddItem(throwingHandle, 5)
- throwingHandle.Transparency=0
- throwingHandle.Parent = workspace
- if player.Character and player.Character.Humanoid then
- throwingHandle.Velocity = (player.Character.Humanoid.TargetPoint - throwingHandle.CFrame.p).unit * 150
- if canLaser then
- throwingHandle.Velocity = (player.Character.Humanoid.TargetPoint - throwingHandle.CFrame.p).unit * 9999
- end
- if mouse.Target ~= nil then
- if mouse.Target.Parent.Name~="Arms_Model" and mouse.Target.Name~="ThrownKnife" and mouse.Target.Name~="Handle" then
- targetpos=player.Character.Humanoid.TargetPoint
- else
- targetpos=Vector3.new(0,-10 ,0)
- end
- end
- -- set the orientation to the direction it is being thrown in
- throwingHandle.CFrame = CFrame.new(throwingHandle.CFrame.p, throwingHandle.CFrame.p + throwingHandle.Velocity) * CFrame.Angles(0, 0, math.rad(-90))
- local floatingForce = Instance.new('BodyForce', throwingHandle)
- floatingForce.force = Vector3.new(0, 196.2 * throwingHandle:GetMass() * 0.98, 0)
- local spin = Instance.new('BodyAngularVelocity', throwingHandle)
- spin.angularvelocity = throwingHandle.CFrame:vectorToWorldSpace(Vector3.new(0, -400, 0))
- spawnPos=player.Character.PrimaryPart.Position
- spawnPos = spawnPos + dPos*5
- if canLaser then
- local Ray = Ray.new(tool.Handle.CFrame.p,(mouse.Hit.p - tool.Handle.CFrame.p).unit * 999)
- local Hit,Position = game.Workspace:FindPartOnRay(Ray,char)
- if Hit then
- if Hit.Parent:FindFirstChild("Humanoid") then
- Hit.Parent.Humanoid:TakeDamage(110)
- laserCharge=true
- end end
- local RayPart = Instance.new("Part",workspace)
- RayPart.Name = "RayPart"
- RayPart.BrickColor = BrickColor.new("Bright red")
- RayPart.Transparency = 0
- RayPart.Anchored = true
- RayPart.CanCollide = false
- RayPart.TopSurface = Enum.SurfaceType.Smooth
- RayPart.BottomSurface = Enum.SurfaceType.Smooth
- RayPart.formFactor = Enum.FormFactor.Custom
- local Distance = (Position-tool.Handle.CFrame.p).magnitude
- RayPart.Size = Vector3.new(0.2,0.2,Distance)
- RayPart.CFrame = CFrame.new(Position,tool.Handle.CFrame.p) * CFrame.new(0,0,-Distance/2)
- game.Debris:addItem(RayPart,.5)
- PlaySound("Laser")
- end
- end
- if throwingHandle then
- local touchedConn = throwingHandle.Touched:connect(function(hit)
- local char=hit.Parent
- camera.CameraSubject=humanoid
- camera.CameraType=Enum.CameraType.Custom
- if char and char~=player.Character and char.Name~="Arms_Model" and hit.Name~="Handle" and hit.Name~="RayPart" then
- local h=char:FindFirstChild("Humanoid")
- if h and h.Health > 0 then
- throwingHandle:Destroy()
- laserCharge=true
- if hit.Name~="Head" or hit.className=="Hat" then
- h:TakeDamage(Damage)
- PlaySound("Hit1",char.Torso)
- if h.Health == 0 then
- PlaySound("Hit2",char.Torso)
- end
- else
- h:TakeDamage(Damage * 2)
- print("Headshot!")
- char.Head.Transparency=1
- char.Head.CanCollide=false
- if char.Head:FindFirstChild("face") then char.Head:FindFirstChild("face").Transparency=1 end
- for _,v in pairs(char:GetChildren()) do
- if v.className=="Hat" then
- v:Destroy()
- end
- end
- for i = 1, 7 do
- local blood=Instance.new("Part")
- blood.FormFactor="Custom"
- blood.Size=Vector3.new(1,.2,1)
- blood.BrickColor=BrickColor.Red()
- blood.TopSurface=0
- blood.BottomSurface=0
- game:GetService("Debris"):AddItem(blood,5)
- blood.Parent=workspace
- blood.Position=char.Head.Position + Vector3.new(math.random(0.2,0.8),0,math.random(0.2,0.8))
- end
- local sound = Instance.new("Sound")
- sound.SoundId = "rbxassetid://142347633"
- sound.Parent=char.Head
- sound.Pitch=1.1
- sound:Play()
- end
- PlaySound("Hit1")
- if h.Health == 0 then
- PlaySound("Hit2")
- end
- elseif hit.Name~="Handle" or hit.Name~="IgnoreThrowingKnives" and hit.Parent.Name~="Arms_Model" and hit.Name~="RayPart" and hit.CanCollide==true then
- local sound=Instance.new("Sound")
- sound.Parent=hit
- sound.SoundId = "rbxassetid://" .. SOUNDS.wallhit[math.random(1,#SOUNDS.wallhit)]
- sound:Play()
- sound:Destroy()
- print("Hit Object: " .. hit.Name)
- local newknife=tool.Handle:clone()
- newknife.Name="ThrownKnife"
- newknife.CFrame = CFrame.new(spawnPos, spawnPos + dPos) * CFrame.Angles(math.pi/-2, 0, 0)
- newknife.Position = targetpos
- throwingHandle:Destroy()
- newknife.Anchored=true
- newknife.CanCollide=true
- newknife.Transparency=0
- newknife.Parent=workspace
- wait(7)
- for i=1,10 do
- newknife.Transparency=i*.1
- wait()
- end
- newknife:Destroy()
- end
- end
- end)
- end
- end
- -- must check if it still exists since we waited
- if throwingHandle then
- throwingHandle.CanCollide = true
- end
- FUNCTIONS={
- CHECKFORFIRSTPERSON=function()
- if (camera.focus.p - camera.CoordinateFrame.p).magnitude > 1 then
- return false
- else
- return true
- end
- end,
- ANIMS=function(state)
- if state then
- mouse.Icon="http://www.roblox.com/asset/?id=54019936"
- --Start Animation
- local mesh=Instance.new("FileMesh")
- mesh.MeshId=SETTINGS.tool.mesh_id
- mesh.TextureId=SETTINGS.tool.texture_id
- mesh.Scale=Vector3.new(SETTINGS.tool.mesh_scale,SETTINGS.tool.mesh_scale,SETTINGS.tool.mesh_scale)
- mesh.Parent=tool.Handle
- if SETTINGS.tool.mesh_scale==.1 then
- tool.GripPos = Vector3.new(0, -0.55, 0)
- elseif SETTINGS.tool.mesh_scale==.2 then
- tool.GripPos = Vector3.new(0, -0.6, 0)
- elseif SETTINGS.tool.mesh_scale==.3 then
- tool.GripPos = Vector3.new(0, -0.65, 0)
- elseif SETTINGS.tool.mesh_scale==.4 then
- tool.GripPos = Vector3.new(0, -0.7, 0)
- elseif SETTINGS.tool.mesh_scale==.5 then
- tool.GripPos = Vector3.new(0, -0.75, 0)
- elseif SETTINGS.tool.mesh_scale==.6 then
- tool.GripPos = Vector3.new(0, -0.8, 0)
- elseif SETTINGS.tool.mesh_scale==.7 then
- tool.GripPos = Vector3.new(0, -0.85, 0)
- elseif SETTINGS.tool.mesh_scale==.8 then
- tool.GripPos = Vector3.new(0, -0.9, 0)
- elseif SETTINGS.tool.mesh_scale==.9 then
- tool.GripPos = Vector3.new(0, -0.95, 0)
- elseif SETTINGS.tool.mesh_scale==1 then
- tool.GripPos = Vector3.new(0, -1, 0)
- else
- print("Invalid tool size! Set to default: " .. SETTINGS.tool.default_tool_size )
- mesh.Scale=Vector3.new(SETTINGS.tool.default_tool_size,SETTINGS.tool.default_tool_size,SETTINGS.tool.default_tool_size)
- if SETTINGS.tool.default_tool_size==.1 then
- tool.GripPos = Vector3.new(0, -0.55, 0)
- elseif SETTINGS.tool.default_tool_size==.2 then
- tool.GripPos = Vector3.new(0, -0.6, 0)
- elseif SETTINGS.tool.default_tool_size==.3 then
- tool.GripPos = Vector3.new(0, -0.65, 0)
- elseif SETTINGS.tool.default_tool_size==.4 then
- tool.GripPos = Vector3.new(0, -0.7, 0)
- elseif SETTINGS.tool.default_tool_size==.5 then
- tool.GripPos = Vector3.new(0, -0.75, 0)
- elseif SETTINGS.tool.default_tool_size==.6 then
- tool.GripPos = Vector3.new(0, -0.8, 0)
- elseif SETTINGS.tool.default_tool_size==.7 then
- tool.GripPos = Vector3.new(0, -0.85, 0)
- elseif SETTINGS.tool.default_tool_size==.8 then
- tool.GripPos = Vector3.new(0, -0.9, 0)
- elseif SETTINGS.tool.default_tool_size==.9 then
- tool.GripPos = Vector3.new(0, -0.95, 0)
- elseif SETTINGS.tool.default_tool_size==1 then
- tool.GripPos = Vector3.new(0, -1, 0)
- else
- print("Invalid default size! Un-equipping and removing Knife...")
- if humanoid then
- humanoid:Unequiptools()
- tool:Destroy()
- end
- end
- end
- torso=char:FindFirstChild("Torso")
- leftarm=torso:FindFirstChild("Left Shoulder")
- if leftarm then
- leftarm.Parent=nil
- newarmweld=Instance.new("Weld")
- newarmweld.Name="LeftWeld"
- newarmweld.Part0=torso
- newarmweld.C0 = CFrame.new(-1.5, 0.7, 0)
- newarmweld.C1 = CFrame.new(0, 0.7, 0)
- newarmweld.Part1=char:FindFirstChild("Left Arm")
- newarmweld.Parent=torso
- end
- humanoid.WalkSpeed=WalkSpeeds[2]
- for i = 1, 15, 3 do
- if equipped then
- torso:FindFirstChild("Right Shoulder").C1 = rightC1 * CFrame.Angles((-i * (math.pi / 90)),(-i * (math.pi / 90)),(i * (math.pi / 210)))
- torso:FindFirstChild("LeftWeld").C1 = CFrame.new(-0.2, .7, 0) * CFrame.Angles((-i * (math.pi / 60)),(i * (math.pi / 90)),(-i * (math.pi / 240)))
- end
- wait()
- end
- else
- humanoid.WalkSpeed=WalkSpeeds[1]
- torso:FindFirstChild("Right Shoulder").C1 = rightC1 * CFrame.new(0,-0.2,0)
- tool.GripForward = Vector3.new(0,0,-1)
- newarmweld:Destroy()
- leftarm.Parent=torso
- mouse.Icon=""
- torso:FindFirstChild("Neck").C0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
- torso:FindFirstChild("Right Shoulder").C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- end
- end
- }
- tool.Equipped:connect(function ()
- equipped=true
- PlaySound("Equip")
- FUNCTIONS.ANIMS(true)
- end)
- tool.Unequipped:connect(function ()
- equipped=false
- FUNCTIONS.ANIMS(false)
- end)
- tool.Handle.Touched:connect(function (hit)
- if Attacking then
- DamageObject(hit)
- end
- end)
- tool.Activated:connect(function ()
- if Attacking then return end
- if not tool.Enabled then return end
- justthrown=false
- justattacked=false
- if not gettingknife and not justthrown and not Attacking then
- HeldTime=time()
- end
- playcharge=true
- wait(.15)
- while gettingknife do
- wait()
- end
- local speed=1
- for i = 1, 15, speed do
- if playcharge and equipped and not gettingknife and not justthrown and not Attacking then
- 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)))
- 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)
- 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)
- wait()
- end
- end
- if playcharge then
- canLaser=true
- end
- end)
- tool.Deactivated:connect(function ()
- if not tool.Enabled then return end
- currTime=time()
- playcharge=false
- if HeldTime and currTime - HeldTime > 0.2 and
- currTime - HeldTime > 0.01 and not justthrown and not gettingknife then
- if not Attacking and not justattacked then
- print("Throw")
- if canLaser then
- PlaySound("ThrowLaser")
- else
- PlaySound("Throw")
- end
- tool.Handle.Transparency=1
- local targetPos = player.Character.Humanoid.TargetPoint
- local lookAt = (targetPos - player.Character.PrimaryPart.Position).unit
- local switchEvenOddParity = 1
- local angle = math.ceil((1-1)/2)*math.pi/12*switchEvenOddParity
- Throwtool(CFrame.Angles(0, angle, 0) * lookAt)
- wait()
- canLaser=false
- HeldTime=0
- gettingknife=true
- mouse.Icon="http://www.roblox.com/asset/?id=54020165"
- player.Character["Right Arm"].RightGrip.C1 = CFrame.new(0, -0.800000012, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- for i = 1, 15, .8 do
- if equipped then
- 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)))
- 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)))
- wait()
- end
- end
- justthrown=true
- tool.Handle.Transparency=0
- PlaySound("Equip")
- mouse.Icon="http://www.roblox.com/asset/?id=54019936"
- tool.GripForward = Vector3.new(0,0,-1)
- for i = 1, 15, 1 do
- if equipped then
- 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)))
- wait()
- end
- end
- gettingknife=false
- for i = 1, 15, 3 do
- if equipped then
- torso:FindFirstChild("Right Shoulder").C1 = rightC1 * CFrame.Angles((-i * (math.pi / 90)),(-i * (math.pi / 90)),(i * (math.pi / 210)))
- torso:FindFirstChild("LeftWeld").C1 = CFrame.new(-0.2, .7, 0) * CFrame.Angles((-i * (math.pi / 60)),(i * (math.pi / 90)),(-i * (math.pi / 240)))
- end
- wait()
- end
- end
- else
- if not justthrown and not gettingknife then
- if Attacking then return end
- print("Attack")
- HeldTime=0
- Attacking=true
- justattacked=true
- if math.random(1,2)==1 then
- for i = 1, 15, 3 do
- if equipped and not gettingknife and not justthrown then
- 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)))
- 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)
- wait()
- end
- end
- PlaySound("Swing")
- for i = 1, 15, 3 do
- if equipped and not gettingknife and not justthrown then
- 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)))
- 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)))
- wait()
- end
- end
- for i = 1, 15, 3 do
- if equipped and not justthrown and not gettingknife then
- 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)))
- wait()
- end
- end
- for i = 1, 15, 3 do
- equipping=true
- if equipped and not gettingknife and not justthrown then
- torso:FindFirstChild("Right Shoulder").C1 = rightC1 * CFrame.Angles((-i * (math.pi / 90)),(-i * (math.pi / 90)),(i * (math.pi / 210)))
- torso:FindFirstChild("LeftWeld").C1 = CFrame.new(-0.2, .7, 0) * CFrame.Angles((-i * (math.pi / 60)),(i * (math.pi / 90)),(-i * (math.pi / 240)))
- end
- wait()
- end
- Attacking=false
- else
- for i = 1, 15, 3 do
- if equipped and not gettingknife and not justthrown then
- 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)))
- end
- wait()
- end
- PlaySound("Swing")
- for i = 1, 15, 3 do
- if equipped and not gettingknife and not justthrown then
- 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)
- 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)))
- end
- wait()
- end
- for i = 1, 15, 3 do
- if equipped and not gettingknife and not justthrown then
- 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)
- end
- wait()
- end
- for i = 1, 15, 3 do
- if equipped and not gettingknife and not justthrown then
- torso:FindFirstChild("Right Shoulder").C1 = rightC1 * CFrame.Angles((-i * (math.pi / 90)),(-i * (math.pi / 90)),(i * (math.pi / 210)))
- torso:FindFirstChild("LeftWeld").C1 = CFrame.new(-0.2, .7, 0) * CFrame.Angles((-i * (math.pi / 60)),(i * (math.pi / 90)),(-i * (math.pi / 240)))
- end
- wait()
- end
- Attacking=false
- end
- end
- end
- end)
- mouse.Move:connect(function ()
- if equipped and mouse then
- if (mouse.Hit.p - mouse.Origin.p).unit.y < 0.25 and (mouse.Hit.p - mouse.Origin.p).unit.y > -0.25 then
- 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))
- 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))
- 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)
- end
- end
- end)
- end))
- ScreenGui107.Parent = Tool96
- TextLabel108.Name = "Devs"
- TextLabel108.Parent = ScreenGui107
- TextLabel108.Position = UDim2.new(0.00999999978, 0, 0.899999976, 0)
- TextLabel108.Size = UDim2.new(0, 175, 0, 20)
- TextLabel108.BackgroundColor = BrickColor.new("Really black")
- TextLabel108.BackgroundColor3 = Color3.new(0, 0, 0)
- TextLabel108.BorderColor = BrickColor.new("Teal")
- TextLabel108.BorderColor3 = Color3.new(0.027451, 1, 0.482353)
- TextLabel108.BorderSizePixel = 2
- TextLabel108.Font = Enum.Font.SourceSans
- TextLabel108.FontSize = Enum.FontSize.Size14
- TextLabel108.Text = "Knife Scripted by Cryme Studios"
- TextLabel108.TextColor = BrickColor.new("Teal")
- TextLabel108.TextColor3 = Color3.new(0.0823529, 1, 0.494118)
- TextLabel108.TextSize = 14
- TextLabel108.TextTransparency = 1
- Sound109.Name = "Hit1"
- Sound109.Parent = Tool96
- Sound109.EmitterSize = 0
- Sound109.MinDistance = 0
- Sound109.Pitch = 1.0225422382355
- Sound109.PlaybackSpeed = 1.0225422382355
- Sound109.SoundId = "rbxassetid://91154909"
- Sound109.Volume = 1
- Sound110.Name = "Hit2"
- Sound110.Parent = Tool96
- Sound110.EmitterSize = 0
- Sound110.MinDistance = 0
- Sound110.Pitch = 1.0092434883118
- Sound110.PlaybackSpeed = 1.0092434883118
- Sound110.SoundId = "rbxassetid://91154932"
- Sound110.Volume = 1
- Sound111.Name = "Hit3"
- Sound111.Parent = Tool96
- Sound111.EmitterSize = 0
- Sound111.MinDistance = 0
- Sound111.Pitch = 1.0101846456528
- Sound111.PlaybackSpeed = 1.0101846456528
- Sound111.SoundId = "rbxassetid://91154954"
- Sound111.Volume = 1
- CharacterMesh112.Name = "Zombie Right Leg"
- CharacterMesh112.Parent = Model0
- CharacterMesh112.BodyPart = Enum.BodyPart.RightLeg
- CharacterMesh112.MeshId = 37683227
- CharacterMesh112.OverlayTextureId = 37687646
- Camera113.Name = "ThumbnailCamera"
- Camera113.Parent = Model0
- 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)
- Camera113.CameraSubject = Part56
- 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)
- Camera113.Focus = CFrame.new(72.7038498, 4.214571, -293.379852, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Camera113.focus = CFrame.new(72.7038498, 4.214571, -293.379852, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = workspace
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement