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
- 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
- plr = owner
- nob = 1
- max = 4
- min = 1
- blockt = "WoodPlanks"
- dmg = 10
- r1 = -15
- r2 = -25
- r3 = -35
- hold = true
- attack = false
- mouse = plr:GetMouse()
- char = plr.Character
- plrgui = plr.PlayerGui
- root = char.HumanoidRootPart
- sine = 0
- sin = math.sin
- cos = math.cos
- debris = game:GetService("Debris")
- local gui = Instance.new("ScreenGui",plrgui)
- gui.Name = "SteveHand"
- local hand = Instance.new("ImageLabel",gui)
- hand.Size = UDim2.new(0, 480, 0, 515)
- hand.AnchorPoint = Vector2.new(1, 1.075)
- hand.Position = UDim2.new(1, 0, 1.075, 0)
- hand.BackgroundTransparency = 1
- hand.Image = "rbxassetid://3393883658"
- hand.Rotation = -15
- local Value = Instance.new("NumberValue",char)
- Value.Value = 15
- swait = function(number)
- if number == 0 or number == nil then
- game:GetService("RunService").Heartbeat:Wait()
- else
- for i = 1,number do
- game:GetService("RunService").Heartbeat:Wait()
- end
- end
- end
- function round(n)
- return math.floor(n + 0.5)
- end
- function checkblock()
- if nob == 1 then
- blockt = "WoodPlanks"
- print("WoodPlanks")
- elseif nob == 2 then
- blockt = "Cobblestone"
- print("Cobblestone")
- elseif nob == 3 then
- blockt = "Grass"
- print("Grass")
- elseif nob == 4 then
- blockt = "Torch"
- print("Torch")
- end
- end
- function placeblock()
- local block = Instance.new("Part",workspace)
- block.Size = Vector3.new(3, 3, 3)
- block.Anchored = true
- block.Transparency = 0
- block.CanCollide = true
- local a = mouse.Hit.p
- block.Position = Vector3.new(round(a.x), round(a.y), round(a.z)) + Vector3.new(0, 1.5, 0)
- if blockt == "WoodPlanks" then
- local top = Instance.new("Decal",block)
- top.Name = "a"
- top.Face = "Top"
- top.Texture = "rbxassetid://3131912507"
- top.Transparency = 0
- local top = Instance.new("Decal",block)
- top.Name = "a"
- top.Face = "Bottom"
- top.Texture = "rbxassetid://3131912507"
- top.Transparency = 0
- local top = Instance.new("Decal",block)
- top.Name = "a"
- top.Face = "Left"
- top.Texture = "rbxassetid://3131912507"
- top.Transparency = 0
- local top = Instance.new("Decal",block)
- top.Name = "a"
- top.Face = "Right"
- top.Texture = "rbxassetid://3131912507"
- top.Transparency = 0
- local top = Instance.new("Decal",block)
- top.Name = "a"
- top.Face = "Front"
- top.Texture = "rbxassetid://3131912507"
- top.Transparency = 0
- local top = Instance.new("Decal",block)
- top.Name = "a"
- top.Face = "Back"
- top.Texture = "rbxassetid://3131912507"
- top.Transparency = 0
- elseif blockt == "Cobblestone" then
- local top = Instance.new("Decal",block)
- top.Name = "a"
- top.Face = "Top"
- top.Texture = "rbxassetid://152572105"
- top.Transparency = 0
- local top = Instance.new("Decal",block)
- top.Name = "a"
- top.Face = "Bottom"
- top.Texture = "rbxassetid://152572105"
- top.Transparency = 0
- local top = Instance.new("Decal",block)
- top.Name = "a"
- top.Face = "Left"
- top.Texture = "rbxassetid://152572105"
- top.Transparency = 0
- local top = Instance.new("Decal",block)
- top.Name = "a"
- top.Face = "Right"
- top.Texture = "rbxassetid://152572105"
- top.Transparency = 0
- local top = Instance.new("Decal",block)
- top.Name = "a"
- top.Face = "Front"
- top.Texture = "rbxassetid://152572105"
- top.Transparency = 0
- local top = Instance.new("Decal",block)
- top.Name = "a"
- top.Face = "Back"
- top.Texture = "rbxassetid://152572105"
- top.Transparency = 0
- elseif blockt == "Torch" then
- block.Position = Vector3.new(round(a.x), round(a.y), round(a.z)) + Vector3.new(0, 0.75, 0)
- block.Size = Vector3.new(0.2, 1.4, 0.6)
- local mesh = Instance.new("BlockMesh",block)
- mesh.Scale = Vector3.new(2.5, 1.5, 1)
- local top = Instance.new("Decal",block)
- top.Name = "a"
- top.Face = "Top"
- top.Texture = "rbxassetid://61211168"
- top.Transparency = 0
- local top = Instance.new("Decal",block)
- top.Name = "a"
- top.Face = "Bottom"
- top.Texture = "rbxassetid://152572105"
- top.Transparency = 0
- local top = Instance.new("Decal",block)
- top.Name = "a"
- top.Face = "Left"
- top.Texture = "rbxassetid://61211135"
- top.Transparency = 0
- local top = Instance.new("Decal",block)
- top.Name = "a"
- top.Face = "Right"
- top.Texture = "rbxassetid://61211135"
- top.Transparency = 0
- local top = Instance.new("Decal",block)
- top.Name = "a"
- top.Face = "Front"
- top.Texture = "rbxassetid://61211135"
- top.Transparency = 0
- local top = Instance.new("Decal",block)
- top.Name = "a"
- top.Face = "Back"
- top.Texture = "rbxassetid://61211135"
- top.Transparency = 0
- local light = Instance.new("PointLight",block)
- elseif blockt == "Grass" then
- local top = Instance.new("Decal",block)
- top.Name = "a"
- top.Face = "Top"
- top.Texture = "rbxassetid://50485570"
- top.Transparency = 0
- local top = Instance.new("Decal",block)
- top.Name = "a"
- top.Face = "Bottom"
- top.Texture = "rbxassetid://3757821229"
- top.Transparency = 0
- local top = Instance.new("Decal",block)
- top.Name = "a"
- top.Face = "Left"
- top.Texture = "rbxassetid://3633730371"
- top.Transparency = 0
- local top = Instance.new("Decal",block)
- top.Name = "a"
- top.Face = "Right"
- top.Texture = "rbxassetid://3633730371"
- top.Transparency = 0
- local top = Instance.new("Decal",block)
- top.Name = "a"
- top.Face = "Front"
- top.Texture = "rbxassetid://3633730371"
- top.Transparency = 0
- local top = Instance.new("Decal",block)
- top.Name = "a"
- top.Face = "Back"
- top.Texture = "rbxassetid://3633730371"
- top.Transparency = 0
- end
- for i = 1,5 do
- swait()
- hand.AnchorPoint = hand.AnchorPoint:Lerp(Vector2.new(0.65, 0.65), 0.6)
- hand.Position = hand.Position:Lerp(UDim2.new(0.8, 0, 0.45, 0), 0.6)
- hand.Rotation = r2
- end
- for i = 1,3 do
- swait()
- hand.AnchorPoint = hand.AnchorPoint:Lerp(Vector2.new(0.65, 0.65), 0.6)
- hand.Position = hand.Position:Lerp(UDim2.new(0.65, 0, 0.65, 0), 0.6)
- hand.Rotation = r2
- end
- for i = 1,5 do
- swait()
- hand.AnchorPoint = hand.AnchorPoint:Lerp(Vector2.new(0.65, 1.3), 0.6)
- hand.Position = hand.Position:Lerp(UDim2.new(0.8, 0, 1.3, 0), 0.6)
- hand.Rotation = r3
- end
- end
- function slap()
- attack = true
- hold = true
- hand.Size = UDim2.new(0, 480, 0, 530)
- --[[
- if mouse.Target and mouse.Target.Name ~= "Base" and mouse.Target.Name ~= "Baseplate" then
- local ack = mouse.Target
- local nub = ack.Parent
- if mouse.Target and nub and nub:FindFirstChild("Torso") or mouse.Target and nub and nub:FindFirstChild("UpperTorso") then
- local adada = nub:FindFirstChild("Torso") or nub:FindFirstChild("UpperTorso")
- if adada then
- local bv = Instance.new("BodyVelocity",adada)
- bv.Velocity = root.CFrame.lookVector * 75
- debris:AddItem(bv, 0.1)
- end
- for i,v in pairs (nub:children()) do
- if v:IsA("Part") and nub ~= workspace or v:IsA("MeshPart") and nub ~= workspace then
- local clone = v:Clone()
- clone.Parent = workspace
- clone.Transparency = 0.5
- clone.BrickColor = BrickColor.new("Really red")
- clone.CanCollide = false
- clone.Material = "Neon"
- clone:BreakJoints()
- clone:ClearAllChildren()
- clone.Anchored = true
- clone.Size = clone.Size + Vector3.new(0.1, 0.1, 0.1)
- debris:AddItem(clone, 0.5)
- end
- if v:IsA("Humanoid") and nub ~= workspace then
- v.Health = v.Health - 10
- end
- end
- elseif mouse.Target and mouse.Target.Name ~= "Base" and mouse.Target.Name ~= "Baseplate" and nub == workspace and not nub:FindFirstChild("Torso") or mouse.Target and nub == workspace and not nub:FindFirstChild("UpperTorso") then
- local block = mouse.Target
- if not block:FindFirstChild("crack") then
- local crack = Instance.new("NumberValue",block)
- crack.Value = 1
- crack.Name = "crack"
- local top = Instance.new("Decal",block)
- top.Name = "cracki"
- top.Face = "Top"
- top.Texture = "rbxassetid://110711859"
- top.Transparency = 0.75
- local top = Instance.new("Decal",block)
- top.Name = "cracki"
- top.Face = "Bottom"
- top.Texture = "rbxassetid://110711859"
- top.Transparency = 0.75
- local top = Instance.new("Decal",block)
- top.Name = "cracki"
- top.Face = "Left"
- top.Texture = "rbxassetid://110711859"
- top.Transparency = 0.75
- local top = Instance.new("Decal",block)
- top.Name = "cracki"
- top.Face = "Right"
- top.Texture = "rbxassetid://110711859"
- top.Transparency = 0.75
- local top = Instance.new("Decal",block)
- top.Name = "cracki"
- top.Face = "Front"
- top.Texture = "rbxassetid://110711859"
- top.Transparency = 0.75
- local top = Instance.new("Decal",block)
- top.Name = "cracki"
- top.Face = "Back"
- top.Texture = "rbxassetid://110711859"
- top.Transparency = 0.75
- elseif block:FindFirstChild("crack") then
- local crack = block.crack
- crack.Value = crack.Value + 1
- for i,v in pairs (block:children()) do
- if v:IsA("Decal") and v.Name == "cracki" then
- if crack.Value == 2 then
- v.Transparency = 0.5
- v.Texture = "rbxassetid://53164401"
- end
- if crack.Value == 3 then
- v.Transparency = 0.25
- v.Texture = "http://www.roblox.com/asset/?id=2862610475"
- end
- if crack.Value == 4 then
- v.Transparency = 0
- end
- if crack.Value == 5 then
- block:remove()
- end
- end
- end
- end
- end
- end
- ]]
- repeat
- if mouse.Target and mouse.Target.Name ~= "Base" and mouse.Target.Name ~= "Baseplate" then
- local ack = mouse.Target
- local nub = ack.Parent
- if mouse.Target and nub and nub:FindFirstChild("Torso") or mouse.Target and nub and nub:FindFirstChild("UpperTorso") then
- local adada = nub:FindFirstChild("Torso") or nub:FindFirstChild("UpperTorso")
- if adada then
- local bv = Instance.new("BodyVelocity",adada)
- bv.Velocity = root.CFrame.lookVector * 75
- debris:AddItem(bv, 0.1)
- local s = Instance.new("Sound",adada) s.SoundId = "rbxassetid://4018616850" s.Volume = 10 s:Play()
- end
- for i,v in pairs (nub:children()) do
- if v:IsA("Part") and nub ~= workspace or v:IsA("MeshPart") and nub ~= workspace then
- local clone = v:Clone()
- clone.Parent = workspace
- clone.Transparency = 0.5
- clone.BrickColor = BrickColor.new("Really red")
- clone.CanCollide = false
- clone.Material = "Neon"
- clone:BreakJoints()
- clone:ClearAllChildren()
- clone.Anchored = true
- clone.Size = clone.Size + Vector3.new(0.1, 0.1, 0.1)
- debris:AddItem(clone, 0.5)
- end
- if v:IsA("Humanoid") and nub ~= workspace then
- v.Health = v.Health - dmg
- end
- end
- elseif mouse.Target and mouse.Target.Name ~= "Base" and mouse.Target.Name ~= "Baseplate" and nub == workspace and not nub:FindFirstChild("Torso") or mouse.Target and nub == workspace and not nub:FindFirstChild("UpperTorso") then
- local block = mouse.Target
- if not block:FindFirstChild("crack") then
- local crack = Instance.new("NumberValue",block)
- crack.Value = 1
- crack.Name = "crack"
- local top = Instance.new("Decal",block)
- top.Name = "cracki"
- top.Face = "Top"
- top.Texture = "rbxassetid://110711859"
- top.Transparency = 0.75
- local top = Instance.new("Decal",block)
- top.Name = "cracki"
- top.Face = "Bottom"
- top.Texture = "rbxassetid://110711859"
- top.Transparency = 0.75
- local top = Instance.new("Decal",block)
- top.Name = "cracki"
- top.Face = "Left"
- top.Texture = "rbxassetid://110711859"
- top.Transparency = 0.75
- local top = Instance.new("Decal",block)
- top.Name = "cracki"
- top.Face = "Right"
- top.Texture = "rbxassetid://110711859"
- top.Transparency = 0.75
- local top = Instance.new("Decal",block)
- top.Name = "cracki"
- top.Face = "Front"
- top.Texture = "rbxassetid://110711859"
- top.Transparency = 0.75
- local top = Instance.new("Decal",block)
- top.Name = "cracki"
- top.Face = "Back"
- top.Texture = "rbxassetid://110711859"
- top.Transparency = 0.75
- elseif block:FindFirstChild("crack") then
- local crack = block.crack
- crack.Value = crack.Value + 1
- for i,v in pairs (block:children()) do
- if v:IsA("Decal") and v.Name == "cracki" then
- if crack.Value == 2 then
- v.Transparency = 0.5
- v.Texture = "rbxassetid://53164401"
- end
- if crack.Value == 3 then
- v.Transparency = 0.25
- v.Texture = "http://www.roblox.com/asset/?id=2862610475"
- end
- if crack.Value == 4 then
- v.Transparency = 0
- end
- if crack.Value == 5 then
- block:remove()
- end
- end
- end
- end
- end
- end
- for i = 1,5 do
- swait()
- hand.AnchorPoint = hand.AnchorPoint:Lerp(Vector2.new(0.65, 0.65), 0.6)
- hand.Position = hand.Position:Lerp(UDim2.new(0.8, 0, 0.45, 0), 0.6)
- hand.Rotation = r2
- end
- for i = 1,3 do
- swait()
- hand.AnchorPoint = hand.AnchorPoint:Lerp(Vector2.new(0.65, 0.65), 0.6)
- hand.Position = hand.Position:Lerp(UDim2.new(0.65, 0, 0.65, 0), 0.6)
- hand.Rotation = r2
- end
- for i = 1,5 do
- swait()
- hand.AnchorPoint = hand.AnchorPoint:Lerp(Vector2.new(0.65, 1.3), 0.6)
- hand.Position = hand.Position:Lerp(UDim2.new(0.8, 0, 1.3, 0), 0.6)
- hand.Rotation = r3
- end
- until hold == false
- hold = false
- attack = false
- end
- mouse.KeyDown:connect(function(key)
- if key == "q" then
- hand.Image = "rbxassetid://3393883658"
- dmg = 10
- r1 = -15
- r2 = -25
- r3 = -35
- end
- if key == "e" then
- hand.Image = "rbxassetid://3516782316"
- dmg = 35
- r1 = -75
- r2 = -75
- r3 = -120
- end
- if key == "x" then
- if nob ~= max then
- nob = nob + 1
- elseif nob == max then
- nob = min
- end
- checkblock()
- end
- if key == "z" then
- if nob ~= min then
- nob = nob - 1
- elseif nob == min then
- nob = max
- end
- checkblock()
- end
- end)
- mouse.Button1Down:connect(function()
- if attack == false then
- slap()
- end
- end)
- mouse.Button2Down:connect(function()
- if attack == false then
- placeblock()
- end
- end)
- mouse.Button1Up:connect(function()
- hold = false
- end)
- coroutine.resume(coroutine.create(function()
- local fallTime = 0
- while true do
- local x = wait()
- if root.Velocity.Y <= -10 then
- fallTime = fallTime + x
- end
- if root.Velocity.Y > -10 then
- if fallTime >= 0.4 then
- char.Humanoid:TakeDamage(fallTime * 50)
- end
- fallTime = 0
- end
- end
- end))
- while true do
- swait()
- sine = sine + 1
- local TORSOVELOCITY = (root.Velocity * Vector3.new(1, 0, 1)).magnitude
- if TORSOVELOCITY < 0.5 and attack == false then
- hand.Size = UDim2.new(0, 480, 0, 515)
- hand.AnchorPoint = hand.AnchorPoint:Lerp(Vector2.new(1, 1.075), 0.3)
- hand.Position = hand.Position:Lerp(UDim2.new(1, 0, 1.075, 0), 0.3)
- hand.Rotation = r1
- elseif TORSOVELOCITY > 0.5 and attack == false then
- hand.Size = UDim2.new(0, 480, 0, 515)
- hand.AnchorPoint = hand.AnchorPoint:Lerp(Vector2.new(1, 1.075), 0.3)
- hand.Position = hand.Position:Lerp(UDim2.new(1 - 0.025 * cos(sine / 8), 0, 1.075 - 0.025 * cos(sine / 4), 0), 0.3)
- hand.Rotation = r1
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement