Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- This script has been converted to FE by iPxter
- 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
- do
- print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
- script.Parent = Player.Character
- --RemoteEvent for communicating
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- --Fake event to make stuff like Mouse.KeyDown work
- local function fakeEvent()
- local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
- t.connect = t.Connect
- return t
- end
- --Creating fake input objects with fake variables
- local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
- local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
- local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
- CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
- end}
- --Merged 2 functions into one by checking amount of arguments
- CAS.UnbindAction = CAS.BindAction
- --This function will trigger the events that have been :Connect()'ed
- local function te(self,ev,...)
- local t = m[ev]
- if t and t._fakeEvent and t.Function then
- t.Function(...)
- end
- end
- m.TrigEvent = te
- UIS.TrigEvent = te
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=Player then return end
- if io.isMouse then
- m.Target = io.Target
- m.Hit = io.Hit
- else
- local b = io.UserInputState == Enum.UserInputState.Begin
- if io.UserInputType == Enum.UserInputType.MouseButton1 then
- return m:TrigEvent(b and "Button1Down" or "Button1Up")
- end
- for _,t in pairs(CAS.Actions) do
- for _,k in pairs(t.Keys) do
- if k==io.KeyCode then
- t.Function(t.Name,io.UserInputState,io)
- end
- end
- end
- m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
- UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
- end
- end)
- Event.Parent = NLS([==[
- local Player = game:GetService("Players").LocalPlayer
- local Event = script:WaitForChild("UserInput_Event")
- local UIS = game:GetService("UserInputService")
- local input = function(io,a)
- if a then return end
- --Since InputObject is a client-side instance, we create and pass table instead
- Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- local Mouse = Player:GetMouse()
- local h,t
- --Give the server mouse data 30 times every second, but only if the values changed
- --If player is not moving their mouse, client won't fire events
- while wait(1/30) do
- if h~=Mouse.Hit or t~=Mouse.Target then
- h,t=Mouse.Hit,Mouse.Target
- Event:FireServer({isMouse=true,Target=t,Hit=h})
- end
- end]==],Player.Character)
- Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
- end
- --encript
- sp = owner.Character
- sp.Head.face.Texture = "http://www.roblox.com/asset/?id=109676489"
- sp["Body Colors"].HeadColor = BrickColor.new("Bright yellow")
- sp["Body Colors"].TorsoColor = BrickColor.new("Bright blue")
- sp["Body Colors"].LeftArmColor = BrickColor.new("Bright yellow")
- sp["Body Colors"].RightArmColor = BrickColor.new("Bright yellow")
- sp["Body Colors"].LeftLegColor = BrickColor.new("Br. yellowish green")
- sp["Body Colors"].RightLegColor = BrickColor.new("Br. yellowish green")
- for _, v in pairs(sp:GetChildren()) do
- if v.ClassName == "Shirt" then
- v:remove()
- end
- end
- for _, v in pairs(sp:GetChildren()) do
- if v.ClassName == "Pants" then
- v:remove()
- end
- end
- for _, v in pairs(sp:GetChildren()) do
- if v.ClassName == "Accessory" then
- v:remove()
- end
- end
- 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"))
- Tool0 = Instance.new("Tool")
- BoolValue1 = Instance.new("BoolValue")
- BoolValue2 = Instance.new("BoolValue")
- BoolValue3 = Instance.new("BoolValue")
- BoolValue4 = Instance.new("BoolValue")
- Script5 = Instance.new("Script")
- LocalScript6 = Instance.new("LocalScript")
- LocalScript7 = Instance.new("LocalScript")
- LocalScript8 = Instance.new("LocalScript")
- Part9 = Instance.new("Part")
- Sound10 = Instance.new("Sound")
- Sound11 = Instance.new("Sound")
- Sound12 = Instance.new("Sound")
- SpecialMesh13 = Instance.new("SpecialMesh")
- Animation14 = Instance.new("Animation")
- Animation15 = Instance.new("Animation")
- Animation16 = Instance.new("Animation")
- Animation17 = Instance.new("Animation")
- Animation18 = Instance.new("Animation")
- Script19 = Instance.new("Script")
- Script20 = Instance.new("Script")
- Tool0.Name = "SpamKnife"
- Tool0.Parent = mas
- Tool0.TextureId = "http://www.roblox.com/asset?id=155344898"
- Tool0.GripPos = Vector3.new(0, -1, -0.100000001)
- BoolValue1.Name = "PlayDownStab"
- BoolValue1.Parent = Tool0
- BoolValue2.Name = "PlayStabPunch"
- BoolValue2.Parent = Tool0
- BoolValue3.Name = "PlayThrow"
- BoolValue3.Parent = Tool0
- BoolValue4.Name = "PlayThrowCharge"
- BoolValue4.Parent = Tool0
- Script5.Name = "SoundScript"
- Script5.Parent = Tool0
- table.insert(cors,sandbox(Script5,function()
- -- Waits for the child of the specified parent
- local function WaitForChild(parent, childName)
- while not parent:FindFirstChild(childName) do parent.ChildAdded:wait() end
- return parent[childName]
- end
- local Tool = script.Parent
- local Handle = WaitForChild(Tool, 'Handle')
- local Debounce = false
- local TouchConnection
- function OnTouched(hit)
- local humanoid = hit.Parent:findFirstChild('Humanoid')
- if Debounce == false then
- Debounce = true
- if humanoid then
- else
- Handle.Ting:Play()
- end
- end
- wait(0.5)
- Debounce = false
- end
- Tool.Equipped:connect(function()
- TouchConnection = Handle.Touched:connect(OnTouched)
- end)
- Tool.Unequipped:connect(function()
- if TouchConnection then
- TouchConnection:disconnect()
- TouchConnection = nil
- end
- end)
- end))
- LocalScript6.Name = "AnimationScript"
- LocalScript6.Parent = Tool0
- table.insert(cors,sandbox(LocalScript6,function()
- -- Waits for the child of the specified parent
- local function WaitForChild(parent, childName)
- while not parent:FindFirstChild(childName) do parent.ChildAdded:wait() end
- return parent[childName]
- end
- local Tool = script.Parent
- local downStabAnim
- local stabPunchAnim
- local throwAnim
- local throwChargeAnim
- local MyHumanoid
- -- This table will make sure that when we stop an animation it is
- -- because it is the only animation of it running
- local PlayCountTable = {}
- local function PlayAnimation(animation, valueToCheck, animationLength)
- if valueToCheck and valueToCheck.Value then
- if MyHumanoid then
- animation:Play()
- if PlayCountTable[animation] then
- PlayCountTable[animation] = PlayCountTable[animation] + 1
- end
- -- wait the duration of the animation
- if animationLength then
- wait(animationLength)
- if PlayCountTable[animation] then
- PlayCountTable[animation] = PlayCountTable[animation] - 1
- if PlayCountTable[animation] == 0 then
- animation:Stop()
- end
- end
- end
- end
- end
- end
- function OnEquipped()
- MyHumanoid = Tool.Parent:FindFirstChild('Humanoid')
- downStabAnim = MyHumanoid:LoadAnimation(WaitForChild(Tool, 'DownStab'))
- PlayCountTable[downStabAnim] = 0
- stabPunchAnim = MyHumanoid:LoadAnimation(WaitForChild(Tool, 'StabPunch'))
- PlayCountTable[stabPunchAnim] = 0
- throwAnim = MyHumanoid:LoadAnimation(WaitForChild(Tool, 'Throw'))
- PlayCountTable[throwAnim] = 0
- throwChargeAnim = MyHumanoid:LoadAnimation(WaitForChild(Tool, 'ThrowCharge'))
- PlayCountTable[throwChargeAnim] = 0
- local playStabPunch = WaitForChild(Tool, 'PlayStabPunch')
- local playDownStab = WaitForChild(Tool, 'PlayDownStab')
- local playThrow = WaitForChild(Tool, 'PlayThrow')
- local playThrowCharge = WaitForChild(Tool, 'PlayThrowCharge')
- playStabPunch.Changed:connect(function() PlayAnimation(stabPunchAnim, playStabPunch, 1.0) end)
- playDownStab.Changed:connect(function() PlayAnimation(downStabAnim, playDownStab, 1.0) end)
- playThrow.Changed:connect(function() PlayAnimation(throwAnim, playThrow, 1.5) end)
- playThrowCharge.Changed:connect(function(value)
- if value then
- PlayAnimation(throwChargeAnim, playThrowCharge, 1.0)
- else
- throwChargeAnim:Stop()
- end
- end)
- end
- function OnUnequipped()
- if downStabAnim then
- downStabAnim:Stop()
- downStabAnim = nil
- end
- if stabPunchAnim then
- stabPunchAnim:Stop()
- stabPunchAnim = nil
- end
- if throwAnim then
- throwAnim:Stop()
- throwAnim = nil
- end
- if throwChargeAnim then
- throwChargeAnim:Stop()
- throwChargeAnim = nil
- end
- PlayCountTable = {}
- end
- Tool.Equipped:connect(OnEquipped)
- Tool.Unequipped:connect(OnUnequipped)
- end))
- LocalScript7.Name = "BladeGui"
- LocalScript7.Parent = Tool0
- table.insert(cors,sandbox(LocalScript7,function()
- local Tool = script.Parent
- function OnButton1Down(mouse)
- if Tool.Enabled then
- mouse.Icon = 'http://www.roblox.com/asset/?id=54019936'
- else
- mouse.Icon = 'http://www.roblox.com/asset/?id=54019936'
- end
- while not Tool.Enabled do
- Tool.Changed:wait()
- end
- if Tool.Enabled then
- mouse.Icon = 'http://www.roblox.com/asset/?id=54019936'
- end
- end
- function OnEquipped(mouse)
- if mouse == nil then
- print("Mouse not found")
- return
- end
- mouse.Icon = 'http://www.roblox.com/asset/?id=54019936'
- mouse.Button1Down:connect(function() OnButton1Down(mouse) end)
- end
- Tool.Equipped:connect(OnEquipped)
- end))
- LocalScript8.Name = "KnifeScript"
- LocalScript8.Parent = Tool0
- table.insert(cors,sandbox(LocalScript8,function()
- --------------------- TEMPLATE BLADE WEAPON ---------------------------
- -- Waits for the child of the specified parent
- local function WaitForChild(parent, childName)
- while not parent:FindFirstChild(childName) do parent.ChildAdded:wait() end
- return parent[childName]
- end
- local SLASH_DAMAGE = 20
- local DOWNSTAB_DAMAGE = 35
- local THROWING_DAMAGE = 40
- local HOLD_TO_THROW_TIME = 0
- local Damage = 20
- local MyHumanoid = nil
- local MyTorso = nil
- local MyCharacter = nil
- local MyPlayer = nil
- local Tool = script.Parent
- local Handle = WaitForChild(Tool, 'Handle')
- local BlowConnection
- local Button1DownConnection
- local Button1UpConnection
- local PlayStabPunch
- local PlayDownStab
- local PlayThrow
- local PlayThrowCharge
- local IconUrl = Tool.TextureId -- URL to the weapon knife icon asset
- local DebrisService = game:GetService('Debris')
- local PlayersService = game:GetService('Players')
- local SlashSound
- local HitPlayers = {}
- local LeftButtonDownTime = nil
- local Attacking = false
- function Blow(hit)
- if Attacking then
- BlowDamage(hit, Damage)
- end
- end
- function BlowDamage(hit, damage)
- local humanoid = hit.Parent:FindFirstChild('Humanoid')
- local player = PlayersService:GetPlayerFromCharacter(hit.Parent)
- if humanoid ~= nil and MyHumanoid ~= nil and humanoid ~= MyHumanoid then
- if not MyPlayer.Neutral then
- -- Ignore teammates hit
- if player and player ~= MyPlayer and player.TeamColor == MyPlayer.TeamColor then
- return
- end
- end
- -- final check, make sure weapon is in-hand
- local rightArm = MyCharacter:FindFirstChild('Right Arm')
- if (rightArm ~= nil) then
- -- Check if the weld exists between the hand and the weapon
- local joint = rightArm:FindFirstChild('RightGrip')
- if (joint ~= nil and (joint.Part0 == Handle or joint.Part1 == Handle)) then
- -- Make sure you only hit them once per swing
- TagHumanoid(humanoid, MyPlayer)
- print("Sending " .. damage)
- local checksound = humanoid.Parent:findFirstChild("Sound")
- if checksound == nil then
- local givesound = script.Parent.Sound:clone()
- givesound.Parent = humanoid.Parent
- givesound.Disabled = false
- else
- checksound:remove()
- local givesound = script.Parent.Sound:clone()
- givesound.Parent = humanoid.Parent
- givesound.Disabled = false
- end
- wait()
- humanoid.Parent:BreakJoints()
- if humanoid.Health == math.huge or humanoid.MaxHealth == math.huge then
- humanoid.Parent:BreakJoints()
- end
- end
- end
- end
- end
- function TagHumanoid(humanoid, player)
- -- Add more tags here to customize what tags are available.
- while humanoid:FindFirstChild('creator') do
- humanoid:FindFirstChild('creator'):Destroy()
- end
- local creatorTag = Instance.new('ObjectValue')
- creatorTag.Value = player
- creatorTag.Name = 'creator'
- creatorTag.Parent = humanoid
- DebrisService:AddItem(creatorTag, 1.5)
- local weaponIconTag = Instance.new('StringValue')
- weaponIconTag.Value = IconUrl
- weaponIconTag.Name = 'icon'
- weaponIconTag.Parent = creatorTag
- DebrisService:AddItem(weaponIconTag, 1.5)
- end
- function HardAttack()
- Damage = SLASH_DAMAGE
- HitSound:play()
- if PlayStabPunch then
- PlayStabPunch.Value = true
- wait(1.0)
- PlayStabPunch.Value = false
- end
- end
- function NormalAttack()
- Damage = DOWNSTAB_DAMAGE
- KnifeDown()
- HitSound:play()
- if PlayDownStab then
- PlayDownStab.Value = true
- wait(1.0)
- PlayDownStab.Value = false
- end
- KnifeUp()
- end
- function ThrowAttack()
- KnifeOut()
- if PlayThrow then
- PlayThrow.Value = true
- wait()
- if not Handle then return end
- local throwingHandle = Handle:Clone()
- DebrisService:AddItem(throwingHandle, 5)
- throwingHandle.Parent = game.Workspace
- if MyCharacter and MyHumanoid then
- throwingHandle.Velocity = (MyHumanoid.TargetPoint - throwingHandle.CFrame.p).unit * 100
- -- 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))
- end
- Handle.Transparency = 1
- -- Wait so that the knife has left the thrower's general area
- wait()
- if throwingHandle then
- local Throwevent = script.Parent.ThrowHandleHitWeld:Clone()
- Throwevent.Parent = throwingHandle
- Throwevent.Disabled = false
- local touchedConn = throwingHandle.Touched:connect(function(hit) print("hit throw") BlowDamage(hit, THROWING_DAMAGE) end)
- end
- -- must check if it still exists since we waited
- if throwingHandle then
- throwingHandle.CanCollide = true
- end
- wait()
- if Handle and PlayThrow then
- Handle.Transparency = 0
- PlayThrow.Value = false
- end
- end
- KnifeUp()
- end
- function KnifeUp()
- Tool.GripForward = Vector3.new(0,0,-1)
- Tool.GripRight = Vector3.new(1,0,0)
- Tool.GripUp = Vector3.new(0,1,0)
- end
- function KnifeDown()
- Tool.GripForward = Vector3.new(0,0,-1)
- Tool.GripRight = Vector3.new(1,0,0)
- Tool.GripUp = Vector3.new(0,-1,0)
- end
- function KnifeOut()
- Tool.GripForward = Vector3.new(0,0,-1)
- Tool.GripRight = Vector3.new(1,0,0)
- Tool.GripUp = Vector3.new(0,1,0)
- end
- Tool.Enabled = true
- function OnLeftButtonDown()
- LeftButtonDownTime = time()
- if PlayThrowCharge then
- PlayThrowCharge.Value = true
- end
- end
- function OnLeftButtonUp()
- if not Tool.Enabled then return end
- -- Reset the list of hit players every time we start a new attack
- HitPlayers = {}
- if PlayThrowCharge then
- PlayThrowCharge.Value = false
- end
- if Tool.Enabled and MyHumanoid and MyHumanoid.Health > 0 then
- Tool.Enabled = false
- local currTime = time()
- if LeftButtonDownTime and currTime - LeftButtonDownTime > HOLD_TO_THROW_TIME and
- currTime - LeftButtonDownTime < 1.15 then
- ThrowAttack()
- else
- Attacking = true
- if math.random(1, 2) == 1 then
- HardAttack()
- else
- NormalAttack()
- end
- Attacking = false
- end
- Tool.Enabled = true
- end
- end
- function OnEquipped(mouse)
- PlayStabPunch = WaitForChild(Tool, 'PlayStabPunch')
- PlayDownStab = WaitForChild(Tool, 'PlayDownStab')
- PlayThrow = WaitForChild(Tool, 'PlayThrow')
- PlayThrowCharge = WaitForChild(Tool, 'PlayThrowCharge')
- SlashSound = WaitForChild(Handle, 'Swoosh1')
- HitSound = WaitForChild(Handle, 'Ting')
- SlashSound:play()
- BlowConnection = Handle.Touched:connect(Blow)
- MyCharacter = Tool.Parent
- MyTorso = MyCharacter:FindFirstChild('Torso')
- MyHumanoid = MyCharacter:FindFirstChild('Humanoid')
- MyPlayer = owner
- if mouse then
- Button1DownConnection = mouse.Button1Down:connect(OnLeftButtonDown)
- Button1UpConnection = mouse.Button1Up:connect(OnLeftButtonUp)
- end
- KnifeUp()
- end
- function OnUnequipped()
- -- Unequip logic here
- if BlowConnection then
- BlowConnection:disconnect()
- BlowConnection = nil
- end
- if Button1DownConnection then
- Button1DownConnection:disconnect()
- Button1DownConnection = nil
- end
- if Button1UpConnection then
- Button1UpConnection:disconnect()
- Button1UpConnection = nil
- end
- MyHumanoid = nil
- end
- Tool.Equipped:connect(OnEquipped)
- Tool.Unequipped:connect(OnUnequipped)
- end))
- Part9.Name = "Handle"
- Part9.Parent = Tool0
- Part9.Material = Enum.Material.DiamondPlate
- Part9.BrickColor = BrickColor.new("Really black")
- Part9.Reflectance = 0.0099999997764826
- Part9.Rotation = Vector3.new(-180, 0, -180)
- Part9.Elasticity = 0
- Part9.FormFactor = Enum.FormFactor.Custom
- Part9.Size = Vector3.new(0.400000006, 3, 0.699999988)
- Part9.CFrame = CFrame.new(0, 17.2999992, 22, -1, 0, 0, 0, 1, 0, 0, 0, -1)
- Part9.BottomSurface = Enum.SurfaceType.Smooth
- Part9.TopSurface = Enum.SurfaceType.Smooth
- Part9.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- Part9.Position = Vector3.new(0, 17.2999992, 22)
- Part9.Orientation = Vector3.new(0, 180, 0)
- Part9.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- Sound10.Name = "Swoosh"
- Sound10.Parent = Part9
- Sound10.SoundId = "http://www.roblox.com/asset?id=153647529"
- Sound10.Volume = 1
- Sound10.PlayOnRemove = true
- Sound11.Name = "Swoosh1"
- Sound11.Parent = Part9
- Sound11.SoundId = "http://www.roblox.com/asset?id=153647514"
- Sound11.Volume = 1
- Sound11.PlayOnRemove = true
- Sound12.Name = "Ting"
- Sound12.Parent = Part9
- Sound12.SoundId = "http://www.roblox.com/asset?id=153647529"
- Sound12.Volume = 0.20000000298023
- SpecialMesh13.Parent = Part9
- SpecialMesh13.MeshId = "http://www.roblox.com/asset/?id=121944778 "
- SpecialMesh13.TextureId = "http://www.roblox.com/asset/?id=121944805 "
- SpecialMesh13.MeshType = Enum.MeshType.FileMesh
- Animation14.Name = "DownStab"
- Animation14.Parent = Tool0
- Animation14.AnimationId = "http://www.roblox.com/Asset?ID=89133529"
- Animation15.Name = "KnifeIdle"
- Animation15.Parent = Tool0
- Animation16.Name = "StabPunch"
- Animation16.Parent = Tool0
- Animation16.AnimationId = "http://www.roblox.com/Asset?ID=89134792"
- Animation17.Name = "Throw"
- Animation17.Parent = Tool0
- Animation17.AnimationId = "http://www.roblox.com/Asset?ID=89147993"
- Animation18.Name = "ThrowCharge"
- Animation18.Parent = Tool0
- Animation18.AnimationId = "http://www.roblox.com/Asset?ID=93103762"
- Script19.Name = "ThrowHandleHitWeld"
- Script19.Parent = Tool0
- Script19.Disabled = true
- table.insert(cors,sandbox(Script19,function()
- arrow = script.Parent
- local HitSound = Instance.new("Sound")
- HitSound.SoundId = "http://www.roblox.com/asset?id=153647563"
- HitSound.Parent = arrow
- HitSound.Volume = .5
- function stick(hit)
- local AV = arrow:findFirstChild("BodyForce")
- local FO = arrow:findFirstChild("BodyAngularVelocity")
- if AV ~= nil then AV:remove() end
- if FO ~= nil then FO:remove() end
- -- joint myself to the thing i hit
- local weld = Instance.new("Weld")
- weld.Name = "PieWeld"
- weld.Part0 = arrow
- weld.Part1 = hit
- local backupweld = Instance.new("Weld")
- backupweld.Name = "PieWeldBackup"
- backupweld.Part0 = arrow
- backupweld.Part1 = hit
- -- correction term to account for average skew between physics update and heartbeat
- local HitPos = arrow.Position --+ (-arrow.Velocity * (1/60)) --+ (arrow.CFrame.lookVector * .5)
- local CJ = CFrame.new(HitPos)
- local C0 = arrow.CFrame:inverse() *CJ
- local C1 = hit.CFrame:inverse() * CJ
- weld.C0 = C0
- weld.C1 = C1
- weld.Parent = arrow
- backupweld.C0 = C0
- backupweld.C1 = C1
- backupweld.Parent = arrow
- end
- function onTouched(hit)
- connection:disconnect()
- stick(hit)
- HitSound:Play()
- end
- connection = arrow.Touched:connect(onTouched)
- wait(2)
- if (arrow:FindFirstChild("PieWeld") ~= nil) then
- arrow.PieWeld:Remove()
- end
- wait(8)
- arrow.Parent = nil
- end))
- Script20.Name = "Sound"
- Script20.Parent = Tool0
- Script20.Disabled = true
- table.insert(cors,sandbox(Script20,function()
- -- For knife
- 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
- function newSound(id)
- local sound = Instance.new("Sound")
- sound.SoundId = id
- sound.archivable = false
- sound.Parent = script.Parent.Head
- return sound
- end
- -- declarations
- local sDied = newSound("http://www.roblox.com/asset?id=146594640")
- local sFallingDown = newSound("rbxasset://sounds/splat.wav")
- local sFreeFalling = newSound("rbxasset://sounds/swoosh.wav")
- local sGettingUp = newSound("rbxasset://sounds/hit.wav")
- local sJumping = newSound("rbxasset://sounds/button.wav")
- local sRunning = newSound("rbxasset://sounds/bfsl-minifigfoots1.mp3")
- sRunning.Looped = true
- local Figure = script.Parent
- local Head = waitForChild(Figure, "Head")
- local Humanoid = waitForChild(Figure, "Humanoid")
- -- functions
- function onDied()
- sDied:Play()
- end
- function onState(state, sound)
- if state then
- sound:Play()
- else
- sound:Pause()
- end
- end
- function onRunning(speed)
- if speed>0.01 then
- sRunning:Play()
- else
- sRunning:Pause()
- end
- end
- -- connect up
- Humanoid.Died:connect(onDied)
- Humanoid.Running:connect(onRunning)
- Humanoid.Jumping:connect(function(state) onState(state, sJumping) end)
- Humanoid.GettingUp:connect(function(state) onState(state, sGettingUp) end)
- Humanoid.FreeFalling:connect(function(state) onState(state, sFreeFalling) end)
- Humanoid.FallingDown:connect(function(state) onState(state, sFallingDown) end)
- end))
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = owner.Backpack
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
- 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"))
- Script0 = Instance.new("Script")
- Sound1 = Instance.new("Sound")
- Sound2 = Instance.new("Sound")
- Sound3 = Instance.new("Sound")
- Sound4 = Instance.new("Sound")
- Sound5 = Instance.new("Sound")
- Sound6 = Instance.new("Sound")
- Script0.Name = "die"
- Script0.Parent = mas
- table.insert(cors,sandbox(Script0,function()
- --[[
- Credit to minecraftbeast78 for script.
- Put the chat in the quotes after script.Parent.Head.
- To change the color, replace Blue after Enum.ChatColor. to Green or Red.
- Make sure the first letter of the color is capitalized.
- You can have mutiple chat colors.
- To change the wait time, change the number in parenthesis to what you want the
- wait time to be.
- The chat will disappear automatically after 6 to 7 seconds.
- ]]
- while true do
- game:GetService("Chat"):Chat(script.Parent.Head, "LIKE THE FLEAS IN YOUR FUR, I KEEP COMING BACK!", Enum.ChatColor.White)
- script.FleasInYourFur:play()
- wait(3)
- game:GetService("Chat"):Chat(script.Parent.Head, "SLIP AND SLIDE ON THIS BANANA PEEL!", Enum.ChatColor.White)
- script.BananaPeel:play()
- wait(4)
- game:GetService("Chat"):Chat(script.Parent.Head, "HA HA HA!", Enum.ChatColor.White)
- wait(2)
- game:GetService("Chat"):Chat(script.Parent.Head, "WHAT ARE YOU DOING?!", Enum.ChatColor.White)
- script.WHATAREYOUDOING:play()
- wait(3)
- game:GetService("Chat"):Chat(script.Parent.Head, "*GASP* AHHHHHHHHHH!", Enum.ChatColor.White)
- script.gaspAAAHHHH:play()
- wait(5)
- game:GetService("Chat"):Chat(script.Parent.Head, "THAT'S MY PURSE! I DON'T KNOW YOU!", Enum.ChatColor.White)
- script.DATSMYPURSE:play()
- wait(3)
- game:GetService("Chat"):Chat(script.Parent.Head, "NO, DON'T TOUCH THAT!", Enum.ChatColor.White)
- script.DONTTOUCHTHAT:play()
- wait(3)
- end
- end))
- Sound1.Name = "BananaPeel"
- Sound1.Parent = Script0
- Sound1.SoundId = "rbxassetid://579837049"
- Sound1.Volume = 1
- Sound2.Name = "DATSMYPURSE"
- Sound2.Parent = Script0
- Sound2.SoundId = "rbxassetid://130760834"
- Sound2.Volume = 1
- Sound3.Name = "DONTTOUCHTHAT"
- Sound3.Parent = Script0
- Sound3.SoundId = "rbxassetid://577962209"
- Sound3.Volume = 1
- Sound4.Name = "FleasInYourFur"
- Sound4.Parent = Script0
- Sound4.SoundId = "rbxassetid://430155758"
- Sound4.Volume = 1
- Sound5.Name = "WHATAREYOUDOING"
- Sound5.Parent = Script0
- Sound5.SoundId = "rbxassetid://549200427"
- Sound5.Volume = 1
- Sound6.Name = "gaspAAAHHHH"
- Sound6.Parent = Script0
- Sound6.SoundId = "rbxassetid://633394595"
- Sound6.Volume = 1
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = owner.Character
- 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