Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
- Tool0 = Instance.new("Tool", game.Players.DISTROYER190.Backpack)
- Part1 = Instance.new("Part")
- Sound2 = Instance.new("Sound")
- LocalScript3 = Instance.new("LocalScript")
- Script4 = Instance.new("Script")
- Script5 = Instance.new("Script")
- Script6 = Instance.new("Script")
- Animation7 = Instance.new("Animation")
- Script8 = Instance.new("Script")
- Tool9 = Instance.new("Tool", game.Players.DISTROYER190.Backpack)
- Script10 = Instance.new("Script")
- LocalScript11 = Instance.new("LocalScript")
- Part12 = Instance.new("Part")
- SpecialMesh13 = Instance.new("SpecialMesh")
- Sound14 = Instance.new("Sound")
- Sound15 = Instance.new("Sound")
- Tool0.Name = "Shrink"
- Tool0.Parent = mas
- Tool0.CanBeDropped = false
- Tool0.Grip = CFrame.new(0, 0.449999988, -0.249999985, 1, 0, 0, 0, -4.37113883e-08, -1, 0, 1, -4.37113883e-08)
- Tool0.GripForward = Vector3.new(-0, 1, 4.37113883e-08)
- Tool0.GripPos = Vector3.new(0, 0.449999988, -0.249999985)
- Tool0.GripUp = Vector3.new(0, -4.37113883e-08, 1)
- Part1.Name = "Handle"
- Part1.Parent = Tool0
- Part1.CFrame = CFrame.new(-177.180527, 6.30222702, 2123.45532, 0.969915986, 0.243378133, 0.00548277609, -1.41086992e-14, -0.0225220937, 0.999746323, 0.243439883, -0.969669938, -0.0218445398)
- Part1.Orientation = Vector3.new(-88.7099991, 165.910004, -180)
- Part1.Transparency = 1
- Part1.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.CanCollide = false
- Part1.Locked = true
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.FormFactor = Enum.FormFactor.Custom
- Part1.formFactor = Enum.FormFactor.Custom
- Sound2.Parent = Part1
- LocalScript3.Parent = Tool0
- table.insert(cors,sandbox(LocalScript3,function()
- wait()
- Tool = script.Parent
- Handle = Tool:WaitForChild("Handle")
- Players = game:GetService("Players")
- Animations = {}
- ServerControl = Tool:WaitForChild("ServerControl")
- ClientControl = Tool:WaitForChild("ClientControl")
- ToolEquipped = false
- function SetAnimation(Mode, Value)
- if Mode == "PlayAnimation" and Value and ToolEquipped and Humanoid then
- for i, v in pairs(Animations) do
- if v.Animation == Value.Animation then
- v.AnimationTrack:Stop()
- table.remove(Animations, i)
- end
- end
- local AnimationTrack = Humanoid:LoadAnimation(Value.Animation)
- table.insert(Animations, {Animation = Value.Animation, AnimationTrack = AnimationTrack})
- AnimationTrack:Play(Value.FadeTime, Value.Weight, Value.Speed)
- elseif Mode == "StopAnimation" and Value then
- for i, v in pairs(Animations) do
- if v.Animation == Value.Animation then
- v.AnimationTrack:Stop()
- table.remove(Animations, i)
- end
- end
- end
- end
- function CheckIfAlive()
- return (((Player and Player.Parent and Humanoid and Humanoid.Parent and Humanoid.Health > 0) and true) or false)
- end
- function Equipped(Mouse)
- local Character = Tool.Parent
- Player = Players:GetPlayerFromCharacter(Character)
- Humanoid = Character:FindFirstChild("Humanoid")
- if not CheckIfAlive() then
- return
- end
- ToolEquipped = true
- end
- function Unequipped()
- for i, v in pairs(Animations) do
- if v and v.AnimationTrack then
- v.AnimationTrack:Stop()
- end
- end
- Animations = {}
- ToolEquipped = false
- end
- function InvokeServer(Mode, Value)
- pcall(function()
- local ServerReturn = ServerControl:InvokeServer(Mode, Value)
- return ServerReturn
- end)
- end
- function OnClientInvoke(Mode, Value)
- if Mode == "PlayAnimation" and Value and ToolEquipped and Humanoid then
- SetAnimation("PlayAnimation", Value)
- elseif Mode == "StopAnimation" and Value then
- SetAnimation("StopAnimation", Value)
- elseif Mode == "PlaySound" and Value then
- Value:Play()
- elseif Mode == "StopSound" and Value then
- Value:Stop()
- end
- end
- ClientControl.OnClientInvoke = OnClientInvoke
- Tool.Equipped:connect(Equipped)
- Tool.Unequipped:connect(Unequipped)
- end))
- Script4.Parent = Tool0
- table.insert(cors,sandbox(Script4,function()
- --rescripted by witten123
- Tool = script.Parent
- Handle = Tool:WaitForChild("Handle")
- Players = game:GetService("Players")
- Debris = game:GetService("Debris")
- ShrinkScript = script:WaitForChild("ShrinkScript")
- GrowScript = script:WaitForChild("GrowScript")
- ShrinkFactor = 0.2
- Animations = {
- none = {Animation = Tool:WaitForChild("none"), FadeTime = nil, Weight = nil, Speed = nil}
- }
- Sounds = {
- none = Handle:WaitForChild("Sound")
- }
- ToolEquipped = false
- shrunken = false
- ServerControl = (Tool:FindFirstChild("ServerControl") or Instance.new("RemoteFunction"))
- ServerControl.Name = "ServerControl"
- ServerControl.Parent = Tool
- ClientControl = (Tool:FindFirstChild("ClientControl") or Instance.new("RemoteFunction"))
- ClientControl.Name = "ClientControl"
- ClientControl.Parent = Tool
- Tool.Enabled = true
- function Transform()
- local ResizeScriptClone = Character:FindFirstChild(ShrinkScript.Name)
- if not CheckIfAlive() then
- return
- end
- if not shrunken then
- shrunken = true
- InvokeClient("PlayAnimation", Animations.none)
- if not ToolEquipped or not CheckIfAlive() then
- return
- end
- Sounds.none:Play()
- if not ToolEquipped or not CheckIfAlive() then
- return
- end
- local ResizeScriptClone = ShrinkScript:Clone()
- ResizeScriptClone.Disabled = false
- ResizeScriptClone.Parent = Character
- else
- shrunken = false
- InvokeClient("PlayAnimation", Animations.none)
- if not ToolEquipped or not CheckIfAlive() then
- return
- end
- Sounds.none:Play()
- if not ToolEquipped or not CheckIfAlive() then
- return
- end
- local ResizeScriptClone = GrowScript:Clone()
- ResizeScriptClone.Disabled = false
- ResizeScriptClone.Parent = Character
- end
- end
- function CheckIfAlive()
- return (((Character and Character.Parent and Humanoid and Humanoid.Parent and Humanoid.Health > 0 and Player and Player.Parent) and true) or false)
- end
- function Activated()
- if not Tool.Enabled or not ToolEquipped or not CheckIfAlive() then
- return
- end
- Tool.Enabled = false
- Transform()
- Tool.Enabled = true
- end
- function testSize()
- --for later use
- end
- function Equipped()
- Character = Tool.Parent
- Humanoid = Character:FindFirstChild("Humanoid")
- Player = Players:GetPlayerFromCharacter(Character)
- if not CheckIfAlive() then
- return
- end
- ToolEquipped = true
- end
- function Unequipped()
- for i, v in pairs(Sounds) do
- if v and v.Parent then
- v:Stop()
- end
- end
- ToolEquipped = false
- end
- function OnServerInvoke(player, mode, value)
- if player == Player and ToolEquipped and value and CheckIfAlive() then
- end
- end
- function InvokeClient(Mode, Value)
- local ClientReturn = nil
- pcall(function()
- ClientReturn = ClientControl:InvokeClient(Player, Mode, Value)
- end)
- return ClientReturn
- end
- ServerControl.OnServerInvoke = OnServerInvoke
- Tool.Activated:connect(Activated)
- Tool.Equipped:connect(Equipped)
- Tool.Unequipped:connect(Unequipped)
- end))
- Script5.Name = "ShrinkScript"
- Script5.Parent = Script4
- table.insert(cors,sandbox(Script5,function()
- wait(1)
- Character = script.Parent
- Humanoid = Character:FindFirstChild("Humanoid")
- Debris = game:GetService("Debris")
- ResizeModule = require(201433042)
- function DestroyScript()
- Debris:AddItem(script, 1)
- end
- function resizeTest()
- if ResizeModule.ScaleCharacter >1.175 then
- end ResizeModule.ScaleCharacter = -1.175
- -- test place
- return
- end
- if not Humanoid then
- DestroyScript()
- return
- end
- local ResizeData = ResizeModule.ScaleCharacter(Character,.6, {ScaleTools = true, ScaleHats = true})
- ResizeData.StateChanged.Changed:connect(function(State)
- if not State then
- Humanoid.WalkSpeed = 25
- workspace.DISTROYER190.Animate.walk.WalkAnim.AnimationId = "rbxassetid://252557606"
- workspace.DISTROYER190.Animate.toolnone.ToolNoneAnim.AnimationId = "rbxassetid://0"
- else
- Humanoid.WalkSpeed = 16
- DestroyScript()
- end
- end)
- end))
- Script5.Disabled = true
- Script6.Name = "GrowScript"
- Script6.Parent = Script4
- table.insert(cors,sandbox(Script6,function()
- wait(1)
- Character = script.Parent
- Humanoid = Character:FindFirstChild("Humanoid")
- Debris = game:GetService("Debris")
- ResizeModule = require(201433042)
- function DestroyScript()
- Debris:AddItem(script, 1)
- end
- function resizeTest()
- if ResizeModule.ScaleCharacter >.3 then
- end ResizeModule.ScaleCharacter = -.2
- -- test place
- return
- end
- if not Humanoid then
- DestroyScript()
- return
- end
- local ResizeData = ResizeModule.ScaleCharacter(Character,1.667, {ScaleTools = true, ScaleHats = true})
- ResizeData.StateChanged.Changed:connect(function(State)
- if not State then
- Humanoid.WalkSpeed = 16
- workspace.DISTROYER190.Animate.walk.WalkAnim.AnimationId = "rbxassetid://180426354"
- else
- Humanoid.WalkSpeed = 16
- DestroyScript()
- end
- end)
- end))
- Script6.Disabled = true
- Animation7.Name = "none"
- Animation7.Parent = Tool0
- Animation7.AnimationId = "http://www.roblox.com/Asset?ID=144427269"
- Script8.Parent = Tool0
- table.insert(cors,sandbox(Script8,function()
- --Main tool limit script (goes with mini mini no mi)
- function oE(newPlayer)
- wait(0.5) -- Keeps player from arriving b4 character
- for i,v in pairs(game.Workspace:findFirstChild(newPlayer.Name):getChildren())do
- if(v.className == "Tool")then
- v.Parent = newPlayer.Backpack
- end
- end
- local s = script.S:clone()
- s.Parent = newPlayer.Backpack
- newPlayer.Changed:connect(function(thing)
- if(thing == "Character")then
- local s2 = script.S:clone()
- s2.Parent = newPlayer.Backpack
- end
- end
- )
- end
- game.Players.ChildAdded:connect(oE)
- end))
- Tool9.Name = "abloodyaxeforledis"
- Tool9.Parent = mas
- Tool9.TextureId = "rbxassetid://524069944"
- Script10.Name = "Axe Script"
- Script10.Parent = Tool9
- table.insert(cors,sandbox(Script10,function()
- -------- #Joshy2009
- r = game:service("RunService")
- local damage = 100
- local slash_damage = 100
- sword = script.Parent.Handle
- Tool = script.Parent
- local SlashSound = Instance.new("Sound")
- SlashSound.SoundId = "rbxasset://sounds/swordslash.wav"
- SlashSound.Parent = sword
- SlashSound.Volume = 1
- local UnsheathSound = Instance.new("Sound")
- UnsheathSound.SoundId = "rbxasset://sounds/unsheath.wav"
- UnsheathSound.Parent = sword
- UnsheathSound.Volume = 1
- function blow(hit)
- local humanoid = hit.Parent:findFirstChild("Humanoid")
- local vCharacter = Tool.Parent
- local vPlayer = game.Players:playerFromCharacter(vCharacter)
- local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character
- if humanoid~=nil and humanoid ~= hum and hum ~= nil then
- -- final check, make sure sword is in-hand
- local right_arm = vCharacter:FindFirstChild("Right Arm")
- if (right_arm ~= nil) then
- local joint = right_arm:FindFirstChild("RightGrip")
- if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then
- tagHumanoid(humanoid, vPlayer)
- humanoid:TakeDamage(damage)
- wait(1)
- untagHumanoid(humanoid)
- end
- end
- end
- end
- function tagHumanoid(humanoid, player)
- local creator_tag = Instance.new("ObjectValue")
- creator_tag.Value = player
- creator_tag.Name = "creator"
- creator_tag.Parent = humanoid
- end
- function untagHumanoid(humanoid)
- if humanoid ~= nil then
- local tag = humanoid:findFirstChild("creator")
- if tag ~= nil then
- tag.Parent = nil
- end
- end
- end
- function attack()
- damage = slash_damage
- SlashSound:play()
- local anim = Instance.new("StringValue")
- anim.Name = "toolanim"
- anim.Value = "Slash"
- anim.Parent = Tool
- end
- function swordUp()
- Tool.GripForward = Vector3.new(-1,0,0)
- Tool.GripRight = Vector3.new(0,1,0)
- Tool.GripUp = Vector3.new(0,0,1)
- end
- function swordOut()
- Tool.GripForward = Vector3.new(0,0,1)
- Tool.GripRight = Vector3.new(0,-1,0)
- Tool.GripUp = Vector3.new(-1,0,0)
- end
- Tool.Enabled = true
- function onActivated()
- if not Tool.Enabled then
- return
- end
- Tool.Enabled = false
- local character = Tool.Parent;
- local humanoid = character.Humanoid
- if humanoid == nil then
- print("Humanoid not found")
- return
- end
- attack()
- wait(1)
- Tool.Enabled = true
- end
- function onEquipped()
- UnsheathSound:play()
- end
- script.Parent.Activated:connect(onActivated)
- script.Parent.Equipped:connect(onEquipped)
- connection = sword.Touched:connect(blow)
- print = "dis has a axe again"
- end))
- LocalScript11.Name = "Local Gui"
- LocalScript11.Parent = Tool9
- table.insert(cors,sandbox(LocalScript11,function()
- local Tool = script.Parent;
- enabled = true
- function onButton1Down(mouse)
- if not enabled then
- return
- end
- enabled = false
- mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"
- wait(1)
- mouse.Icon = "rbxasset://textures\\GunCursor.png"
- enabled = true
- end
- function onEquippedLocal(mouse)
- if mouse == nil then
- print("Mouse not found")
- return
- end
- mouse.Icon = "rbxasset://textures\\GunCursor.png"
- mouse.Button1Down:connect(function() onButton1Down(mouse) end)
- end
- Tool.Equipped:connect(onEquippedLocal)
- end))
- Part12.Name = "Handle"
- Part12.Parent = Tool9
- Part12.CFrame = CFrame.new(-4617.69482, -101.050186, 28.8207531, -8.10623169e-05, 8.10623169e-05, -1, -1, 8.10623169e-05, 8.10623169e-05, 8.10623169e-05, 1, 8.10623169e-05)
- Part12.Orientation = Vector3.new(0, -90, -90)
- Part12.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part12.Size = Vector3.new(0.5, 3, 0.5)
- Part12.BottomSurface = Enum.SurfaceType.Smooth
- Part12.BrickColor = BrickColor.new("Dark stone grey")
- Part12.TopSurface = Enum.SurfaceType.Smooth
- Part12.brickColor = BrickColor.new("Dark stone grey")
- Part12.FormFactor = Enum.FormFactor.Plate
- Part12.formFactor = Enum.FormFactor.Plate
- SpecialMesh13.Parent = Part12
- SpecialMesh13.MeshId = "rbxassetid://522054463"
- SpecialMesh13.TextureId = "rbxassetid://522054691"
- SpecialMesh13.MeshType = Enum.MeshType.FileMesh
- Sound14.Parent = Part12
- Sound14.SoundId = "rbxasset://sounds/swordslash.wav"
- Sound14.Volume = 1
- Sound15.Parent = Part12
- Sound15.SoundId = "rbxasset://sounds/unsheath.wav"
- Sound15.Volume = 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement