Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Hey, thanks for using my steve script!
- i just got to let you know something if you just used it.
- this will NOT work on any script builder that i know of
- the only game i know it will not work on is voidacity's script builder.
- but.
- this will work on a few games.
- i only know one that this script works on
- https://www.roblox.com/games/2577003352
- its called Insert Wars Remade
- its a game where you can insert any free model on the library
- and execute script builder scripts aswell
- all you have to do is open the insert tool
- click the Execute tab
- then put a RAW pastebin link in there.
- btw.
- scripts without a fe converter like mine wont work with fe
- so if you want to run it as local
- go to the bottom right corner of the execute tab window
- press localscript
- or if you have an fe script and you want to use it
- press script if its not already at script
- then you can use my steve script!
- have fun!
- (if you did not get what i said then watch this quick video then you'll get how it works and how to use it. https://www.youtube.com/watch?v=2X_0E_kQa38)
- --]]
- --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,game,owner = owner,game
- local RealPlayer = Player
- do
- print("FE Compatibility code V2 by Mokiros")
- local RealPlayer = RealPlayer
- script.Parent = RealPlayer.Character
- --Fake event to make stuff like Mouse.KeyDown work
- local Disconnect_Function = function(this)
- this[1].Functions[this[2]] = nil
- end
- local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
- local FakeEvent_Metatable = {__index={
- Connect = function(this,f)
- local i = tostring(math.random(0,10000))
- while this.Functions[i] do
- i = tostring(math.random(0,10000))
- end
- this.Functions[i] = f
- return setmetatable({this,i},Disconnect_Metatable)
- end
- }}
- FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
- local function fakeEvent()
- return setmetatable({Functions={}},FakeEvent_Metatable)
- end
- --Creating fake input objects with fake variables
- local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
- FakeMouse.keyUp = FakeMouse.KeyUp
- FakeMouse.keyDown = FakeMouse.KeyDown
- 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 TriggerEvent(self,ev,...)
- for _,f in pairs(self[ev].Functions) do
- f(...)
- end
- end
- FakeMouse.TriggerEvent = TriggerEvent
- UIS.TriggerEvent = TriggerEvent
- --Client communication
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=RealPlayer then return end
- FakeMouse.Target = io.Target
- FakeMouse.Hit = io.Hit
- if not io.isMouse then
- local b = io.UserInputState == Enum.UserInputState.Begin
- if io.UserInputType == Enum.UserInputType.MouseButton1 then
- return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
- end
- if io.UserInputType == Enum.UserInputType.MouseButton2 then
- return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
- 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
- FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
- UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
- end
- end)
- Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
- local Mouse = owner:GetMouse()
- local UIS = game:GetService("UserInputService")
- local input = function(io,RobloxHandled)
- if RobloxHandled 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,Hit=Mouse.Hit,Target=Mouse.Target})
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- local h,t
- --Give the server mouse data every second frame, but only if the values changed
- --If player is not moving their mouse, client won't fire events
- local HB = game:GetService("RunService").Heartbeat
- while true 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
- --Wait 2 frames
- for i=1,2 do
- HB:Wait()
- end
- end]==],script)
- ----Sandboxed game object that allows the usage of client-side methods and services
- --Real game object
- local RealGame = game
- --Metatable for fake service
- local FakeService_Metatable = {
- __index = function(self,k)
- local s = rawget(self,"_RealService")
- if s then
- return typeof(s[k])=="function"
- and function(_,...)return s[k](s,...)end or s[k]
- end
- end,
- __newindex = function(self,k,v)
- local s = rawget(self,"_RealService")
- if s then s[k]=v end
- end
- }
- local function FakeService(t,RealService)
- t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
- return setmetatable(t,FakeService_Metatable)
- end
- --Fake game object
- local FakeGame = {
- GetService = function(self,s)
- return rawget(self,s) or RealGame:GetService(s)
- end,
- Players = FakeService({
- LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
- },"Players"),
- UserInputService = FakeService(UIS,"UserInputService"),
- ContextActionService = FakeService(CAS,"ContextActionService"),
- RunService = FakeService({
- _btrs = {},
- RenderStepped = RealGame:GetService("RunService").Heartbeat,
- BindToRenderStep = function(self,name,_,fun)
- self._btrs[name] = self.Heartbeat:Connect(fun)
- end,
- UnbindFromRenderStep = function(self,name)
- self._btrs[name]:Disconnect()
- end,
- },"RunService")
- }
- rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
- FakeGame.service = FakeGame.GetService
- FakeService(FakeGame,game)
- --Changing owner to fake player object to support owner:GetMouse()
- game,owner = FakeGame,FakeGame.Players.LocalPlayer
- end
- -- ORIGINAL CREATOR: Depr1
- --Fixed lags by stommmDev for toasters if the creator wants to shut down this script i will
- -- If this script isn't on pastebin or the user who uploaded this isn't called "Delros12"
- -- (and yes my pastebin account is Delros12) or the link is not https://pastebin.com/2NNDTLjL
- -- then this is not the original link of this script.
- -- The original link of the script gets edited constantly for updates, if you use the original
- -- link you will be able to enjoy the most recent updates of this script without changing to
- -- another link which contains updated script.
- --[[
- if you scrolled down here then the original link doesnt actually get updated alot execept for this one.
- the original creator is more into game developing and stuff.
- --]]
- -- Enjoy! :)
- -- Controls: Q to sneak, use the keypad numbers 1-9 to change blocks, choose a empty slot i
- -- you want to remove a block.
- -- this script will transform you into steve when used
- local targetName = owner.Name
- local player = game.Players:FindFirstChild(targetName)
- function putTexture(part, frontF, backF, topF, bottomF, leftF, rightF, className)
- local faces = {"Front", "Back", "Top", "Bottom", "Left", "Right"}
- for i,f in pairs(faces) do
- local decal = Instance.new(className, part)
- if i == 1 then decal.Texture = frontF decal.Name = f end
- if i == 2 then decal.Texture = backF or frontF decal.Name = f end
- if i == 3 then decal.Texture = topF or frontF decal.Name = f end
- if i == 4 then decal.Texture = bottomF or frontF decal.Name = f end
- if i == 5 then decal.Texture = leftF or frontF decal.Name = f end
- if i == 6 then decal.Texture = rightF or frontF decal.Name = f end
- decal.Face = f
- end
- return part
- end
- function makeSquare(position, size, color, transparency, parent)
- end
- function putToolBarSlot(position, image)
- local playerGui = player:FindFirstChild("PlayerGui")
- if playerGui then
- end
- end
- function divide(x, d)
- if x ~= 0 and d ~= 0 then
- return x/d
- else
- return x
- end
- end -- so it doesn't divide by zero
- function getDistance(v1, v2)
- return math.abs((Vector3.new(math.abs(v2.X - v1.X), math.abs(v2.Y - v1.Y), math.abs(v2.Z - v1.Z))).Magnitude)
- end
- function round(x)
- if x%2 ~= 0.5 then
- return math.floor(x+0.5)
- end
- return x-0.5
- end
- function weldTo(part1, part2)
- local weld = Instance.new("Weld", part1)
- weld.Part0 = part1
- weld.Part1 = part2
- end
- function getMagnitudeXZ(velocity)
- return math.abs(velocity.X) + math.abs(velocity.Z)
- end
- function placeBlock(block, cFPos)
- end
- local toolBar = {
- }
- if player then
- local char = player.Character
- minecrafttheme = Instance.new("Sound",char)
- minecrafttheme.SoundId = "rbxassetid://4611987152"
- minecrafttheme.Volume = 3
- minecrafttheme:Play()
- minecrafttheme.Looped = true
- if char then
- for _,cM in pairs(char:GetChildren()) do
- if cM.ClassName == "CharacterMesh" then cM:Destroy() end
- end
- --[]
- local gui = player.PlayerGui:FindFirstChild("ToolBar") or Instance.new("ScreenGui", player.PlayerGui)
- gui.Name = "ToolBar"
- makeSquare(UDim2.new(0.5, -166, 1, -111), UDim2.new(0, 364, 0, 44),
- Color3.new(0/255, 0/255, 0/255), 0, gui)
- local blocks = {"Dirt", "Grass", "Stone", "Diamond_Ore", "Diamond_Block", "Wood_Planks", "Oak_Log"}
- for i = 1, 9 do
- if toolBar[blocks[i]] ~= nil then
- putToolBarSlot(UDim2.new(0.5, -160 + ((i-1)*40), 1, -105), toolBar[blocks[i]].frontTex)
- else
- putToolBarSlot(UDim2.new(0.5, -160 + ((i-1)*40), 1, -105), "")
- end
- end
- local humRootPart = char:WaitForChild("HumanoidRootPart")
- local head = char:WaitForChild("Head")
- local torso = char:WaitForChild("Torso")
- local lArm = char:WaitForChild("Left Arm")
- local rArm = char:WaitForChild("Right Arm")
- local lLeg = char:WaitForChild("Left Leg")
- local rLeg = char:WaitForChild("Right Leg")
- head.Size = Vector3.new(1.3, 1.3, 1.3)
- putTexture(head, "rbxassetid://38738031", "rbxassetid://36047330",
- "rbxassetid://36047341", "rbxassetid://36047347",
- "rbxassetid://36047323", "rbxassetid://36047315", "Decal")
- head:WaitForChild("Mesh"):Destroy()
- head:WaitForChild("face"):Destroy()
- torso.Size = Vector3.new(1.3, 1.95, 0.65)
- putTexture(torso, "rbxassetid://38934753", "rbxassetid://38934731",
- "rbxassetid://38934780", "rbxassetid://38934740",
- "rbxassetid://38934762", "rbxassetid://38934762", "Decal")
- lArm.Size = Vector3.new(0.65, 1.95, 0.65)
- putTexture(lArm, "rbxassetid://38934581", "rbxassetid://38934560",
- "rbxassetid://38934613", "rbxassetid://38934568",
- "rbxassetid://38934601", "rbxassetid://38934591", "Decal")
- rArm.Size = Vector3.new(0.65, 1.95, 0.65)
- putTexture(rArm, "rbxassetid://38934560", "rbxassetid://38934581",
- "rbxassetid://38934613", "rbxassetid://38934568",
- "rbxassetid://38934601", "rbxassetid://38934591", "Decal")
- lLeg.Size = Vector3.new(0.65, 1.95, 0.65)
- putTexture(lLeg, "rbxassetid://38936226", "rbxassetid://38936209",
- "rbxassetid://38934719", "rbxassetid://38934712",
- "rbxassetid://38936255", "rbxassetid://38936242", "Decal")
- rLeg.Size = Vector3.new(0.65, 1.95, 0.65)
- putTexture(rLeg, "rbxassetid://38936209", "rbxassetid://38936226",
- "rbxassetid://38934719", "rbxassetid://38934712",
- "rbxassetid://38936242", "rbxassetid://38936255", "Decal")
- char.Humanoid:ClearAllChildren()
- char.Animate:Remove()
- -- now for the real stuff
- -- |
- -- |
- -- V
- Instance.new("BlockMesh", torso)
- Instance.new("BlockMesh", lArm)
- Instance.new("BlockMesh", rArm)
- Instance.new("BlockMesh", lLeg)
- Instance.new("BlockMesh", rLeg)
- local camera = workspace.CurrentCamera
- local camPart = Instance.new("Part", game.Lighting)
- camPart.Size = Vector3.new(0, 0, 0)
- camPart.CFrame = camera.CoordinateFrame
- camPart.Transparency = 1
- camPart.Anchored = true
- --[[local cameraHand = Instance.new("Part", camera)
- cameraHand.Size = Vector3.new(0.65, 1.95, 0.65)
- cameraHand.CanCollide = false
- cameraHand.Anchored = true
- cameraHand.Name = "CameraHand"
- putTexture(cameraHand, "rbxassetid://38934560", "rbxassetid://38934581",
- "rbxassetid://38934613", "rbxassetid://38934568",
- "rbxassetid://38934601", "rbxassetid://38934591", "Decal")
- local cameraHandWeld = Instance.new("Motor6D", camPart)
- cameraHandWeld.Part0 = camPart
- cameraHandWeld.Part1 = cameraHand
- cameraHandWeld.C0 = CFrame.new(5, 0, 0)
- ]]--
- local humanoid = char:WaitForChild("Humanoid")
- humanoid.BreakJointsOnDeath = false
- humanoid.HipHeight = 0.3
- local rootJoint = Instance.new("Motor6D", torso)
- rootJoint.Name = "RootJoint"
- rootJoint.Part0 = humRootPart
- rootJoint.Part1 = torso
- rootJoint.C1 = CFrame.new(0, 0.05, 0)
- local neck = Instance.new("Motor6D", torso)
- neck.Name = "Neck"
- neck.Part0 = head
- neck.Part1 = torso
- local lS = Instance.new("Motor6D", torso)
- lS.Name = "Left Shoulder"
- lS.Part0 = lArm
- lS.Part1 = torso
- lS.C0 = CFrame.new(-0.325, 0.975, 0) * CFrame.Angles(0, 0, 0)
- lS.C1 = CFrame.new(0.65, 0.975, 0)
- local rS = Instance.new("Motor6D", torso)
- rS.Name = "Right Shoulder"
- rS.Part0 = rArm
- rS.Part1 = torso
- rS.C0 = CFrame.new(-0.325, 0.975, 0) * CFrame.Angles(0, 0, 0)
- rS.C1 = CFrame.new(-0.65, 0.975, 0) * CFrame.Angles(0, -math.rad(180), 0)
- local lH = Instance.new("Motor6D", torso)
- lH.Name = "Left Hip"
- lH.Part0 = lLeg
- lH.Part1 = torso
- lH.C0 = CFrame.new(0, 0.975, 0)
- lH.C1 = CFrame.new(0.325, -0.975, 0) * CFrame.Angles(0, 0, 0)
- local rH = Instance.new("Motor6D", torso)
- rH.Name = "Right Hip"
- rH.Part0 = rLeg
- rH.Part1 = torso
- rH.C0 = CFrame.new(0, 0.975, 0)
- rH.C1 = CFrame.new(-0.325, -0.975, 0) * CFrame.Angles(0, -math.rad(180), 0)
- for _,p in pairs(char:GetChildren()) do
- if p.Name ~= "HumanoidRootPart" and p.ClassName == "Part" then
- local hit = Instance.new("Part", char)
- hit.Name = "DamagePart"
- if p.Name == "Right Arm" then
- hit.Name = "Rightarmdamagepoint"
- end
- hit.BrickColor = BrickColor.new("Bright red")
- hit.Material = "SmoothPlastic"
- hit.Transparency = 1
- hit.Size = Vector3.new(p.Size.X + .001, p.Size.Y + .001, p.Size.Z + .001)
- hit.CanCollide = false
- weldTo(hit, p)
- end
- end
- wait(0.25)
- local billNameTag = Instance.new("BillboardGui", char)
- billNameTag.Size = UDim2.new(1, 0, 1, 0)
- billNameTag.Adornee = head
- billNameTag.PlayerToHideFrom = player
- local textLabel = Instance.new("TextLabel", billNameTag)
- textLabel.Font = "Arcade"
- --textLabel.Size = UDim2.new(1, 0, 1, 0)
- textLabel.TextScaled = true
- --textLabel.TextSize = 100
- textLabel.Text = targetName
- textLabel.Size = UDim2.new(textLabel.TextBounds.X/100, 0, 0.75, 0)
- textLabel.BorderSizePixel = 0
- textLabel.BackgroundColor3 = Color3.new(0, 0, 0)
- textLabel.TextColor3 = Color3.new(1, 1, 1)
- textLabel.BackgroundTransparency = 0.5
- if textLabel.Text == "ManDuoMon" then
- textLabel.TextColor3 = Color3.new(1, 0.75, 0)
- end
- billNameTag.SizeOffset = Vector2.new(-textLabel.TextBounds.X/200 + 0.5, 0)
- billNameTag.StudsOffset = Vector3.new(0, 1.5, 0)
- local ticks = 0
- local times = 0
- local walkAnim = 0
- local increaseWalkAnim = 1
- local idleAnimRotX = 0
- local idleAnimRotZ = 0
- local sneaking = 0
- local RS = game:GetService("RunService").RenderStepped
- local Mouse = player:GetMouse()
- local oldHP = humanoid.Health
- local damageTime = 0
- local punchRotX = 0
- local punchRotY = 0
- local punchRotZ = 0
- local punchSpeed = 0
- local punching = 0
- local punchEnded = 1
- local sound = Instance.new("Sound", char)
- sound.Name = "Hurt"
- sound.Volume = 10
- sound.SoundId = "rbxassetid://3362346832"
- if humanoid.Health < oldHP then
- damageTime = 60
- sound:Play()
- end
- local facesToResize = {"Front", "Back", "Left", "Right", "Bottom", "Top"}
- Mouse.Button1Down:connect(function()
- if punchEnded == 1 then punching = 1 end
- if Mouse.Target then
- if getDistance(head.CFrame.p, Mouse.Hit.p) <= 10.4 then
- local humanoid = Mouse.Target.Parent:FindFirstChild("Humanoid")
- if humanoid then
- humanoid.Health = humanoid.Health - 35
- humanoid.Health:TakeDamage(35)
- local parts = Mouse.Target.Parent:GetChildren()
- for _,p in pairs(parts) do
- if p.ClassName == "Part" then
- p.Velocity = Vector3.new(p.Velocity.X + (head.CFrame.lookVector.X * 18), p.Velocity.Y + (head.CFrame.lookVector.Y * 18) + 8, p.Velocity.Z + (head.CFrame.lookVector.Z * 18))
- end
- end
- return
- end
- local x = Mouse.Target.CFrame.p.X
- local y = Mouse.Target.CFrame.p.Y
- local z = Mouse.Target.CFrame.p.Z
- if Mouse.TargetSurface.Name == "Right" then x = x + 2.6 end
- if Mouse.TargetSurface.Name == "Left" then x = x - 2.6 end
- if Mouse.TargetSurface.Name == "Top" then y = y + 2.6 end
- if Mouse.TargetSurface.Name == "Bottom" then y = y - 2.6 end
- if Mouse.TargetSurface.Name == "Back" then z = z + 2.6 end
- if Mouse.TargetSurface.Name == "Front" then z = z - 2.6 end
- if Mouse.Target.Size.X > 2.6 or Mouse.Target.Size.Y > 2.6 or Mouse.Target.Size.Z > 2.6 then
- x = Mouse.Hit.p.X
- y = Mouse.Hit.p.Y
- z = Mouse.Hit.p.Z
- end
- -- local x = round(math.abs(mouseX)/2.6)*2.6
- -- local y = round(math.abs(mouseY)/2.6)*2.6
- -- local z = round(math.abs(mouseZ)/2.6)*2.6
- -- if Mouse.Hit.p.X < 0 then x = x * -1 end
- -- if Mouse.Hit.p.Y < 0 then y = y * -1 end
- -- if Mouse.Hit.p.Z < 0 then z = z * -1 end
- end
- end
- end)
- -- selection thingy
- --
- Mouse.KeyDown:connect(function(key)
- if key == "q" then
- sneaking = 1
- humanoid.WalkSpeed = humanoid.WalkSpeed / 2
- rootJoint.C1 = CFrame.Angles(math.rad(sneaking*25), 0, 0)
- neck.C1 = CFrame.Angles(-math.rad(camPart.Orientation.X - torso.Orientation.X - (sneaking*25)), 0, 0)
- lH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(-math.rad(sneaking*25), 0, 0)
- rH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(math.rad(sneaking*25), 0, 0)
- --print("Sneaking...")
- end
- end)
- Mouse.KeyUp:connect(function(key)
- if key == "q" then
- sneaking = 0
- humanoid.WalkSpeed = humanoid.WalkSpeed * 2
- humanoid.HipHeight = 0.3
- rootJoint.C1 = CFrame.new(0, 0.05, 0) * CFrame.Angles(0, 0, 0)
- lH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(0, 0, 0)
- rH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(0, 0, 0)
- --print("Stopped sneaking...")
- end
- end)
- dead = false
- while RS:wait() do
- if humanoid.Health < oldHP then
- damageTime = 60
- sound:Play()
- end
- oldHP = humanoid.Health
- if damageTime > 0 and humanoid.Health > 0 then
- for _,p in pairs(char:GetChildren()) do
- if p.Name ~= "HumanoidRootPart" and p.ClassName == "Part" then
- if p.Name == "DamagePart" then
- p.Transparency = 0.5
- end
- end
- end
- damageTime = damageTime - 2
- if damageTime <= 0 then
- for _,p in pairs(char:GetChildren()) do
- if p.Name ~= "HumanoidRootPart" and p.ClassName == "Part" then
- if p.Name == "DamagePart" then
- p.Transparency = 1
- end
- end
- end
- end
- end
- neck.C1 = CFrame.new(0, 0.975, 0) * CFrame.Angles(-math.rad(torso.Orientation.X - (sneaking*0)), 0, 0)
- neck.C0 = CFrame.new(0, -0.65, 0)
- if humanoid.Health <= 0 and dead == false then
- dead = true
- local corpseCF = humRootPart.CFrame + Vector3.new(0, -2.925, 0)
- local corpse = Instance.new("Part", workspace)
- corpse.Anchored = true
- corpse.Name = "Dead Corpse"
- target = char
- target.Archivable = true
- playercorpse = target:Clone()
- playercorpse.Parent = corpse
- for i,v in pairs(playercorpse:GetChildren()) do
- if v.Name == "Rightarmdamagepoint" and v.Name == "DamagePart" then
- v:Destroy()
- end
- end
- corpse.Size = Vector3.new(3, 1, 3)
- corpse.CFrame = corpseCF
- corpse.Transparency = 1
- corpse.CustomPhysicalProperties = PhysicalProperties.new(1, 1, 0, 1, 1)
- local dHead = playercorpse.Head
- dHead.CanCollide = false
- dHead.Material = "Fabric"
- local dTorso = playercorpse.Torso
- dTorso.CanCollide = false
- local dLArm = playercorpse["Left Arm"]
- dLArm.CanCollide = false
- local dRArm = playercorpse["Right Arm"]
- dRArm.CanCollide = false
- local dLLeg = playercorpse["Right Leg"]
- dLLeg.CanCollide = false
- local dRLeg = playercorpse["Right Leg"]
- dRLeg.CanCollide = false
- weldCorpse = Instance.new("Weld",corpse)
- weldCorpse.Part0 = dTorso
- weldCorpse.Part1 = corpse
- weldCorpse.C0 = CFrame.new(0, -1.95 - 0.4, 0)
- -- lazy naming...
- for _,p in pairs(playercorpse:GetChildren()) do
- if p.ClassName == "Part" then
- local hit = Instance.new("Part", p)
- hit.Name = "DamagePart"
- hit.BrickColor = BrickColor.new("Bright red")
- hit.Material = "SmoothPlastic"
- hit.Transparency = 0.5
- hit.Size = Vector3.new(p.Size.X + 0.05, p.Size.Y + 0.05, p.Size.Z + 0.05)
- hit.CanCollide = false
- weldTo(hit, p)
- end
- end
- head.Parent = nil
- torso.Parent = nil
- lArm.Parent = nil
- rArm.Parent = nil
- lLeg.Parent = nil
- rLeg.Parent = nil
- weldTo(dTorso, humRootPart)
- for i = 1, 55 do
- corpse.CFrame = corpseCF --*
- --CFrame.Angles(math.rad(-corpse.Orientation.X), 0, math.rad(-corpse.Orientation.Z))
- weldCorpse.C1 = weldCorpse.C1:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, math.rad(90)), 0.075)
- RS:wait()
- end
- for _,p in pairs(corpse:GetChildren()) do
- p:Destroy()
- end
- corpse.Anchored = true
- local smoke = Instance.new("ParticleEmitter", corpse)
- smoke.Size = NumberSequence.new({
- NumberSequenceKeypoint.new(0, 0.6),
- NumberSequenceKeypoint.new(1, 0.6)
- })
- smoke.Texture = "rbxassetid://1494734425"
- smoke.Rate = 100
- smoke.Lifetime = NumberRange.new(0.6, 1.2)
- smoke.Speed = NumberRange.new(2, 5)
- smoke.SpreadAngle = Vector2.new(-30, 30)
- wait(0.07)
- smoke.Enabled = false
- wait(2)
- corpse:Destroy()
- print("You died!")
- end
- if getMagnitudeXZ(torso.Velocity) > 1 then
- if walkAnim >= 1 then
- increaseWalkAnim = -1
- elseif walkAnim <= -1 then
- increaseWalkAnim = 1
- end
- walkAnim = walkAnim + (increaseWalkAnim/(10+(sneaking*20)))
- else
- walkAnim = 0
- end
- --lH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(-math.rad(sneaking*45), 0, 0)
- --rH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(math.rad(sneaking*45), 0, 0)
- lH.C0 = lH.C0:lerp(CFrame.new(0, 0.975, 0) * CFrame.Angles(math.max(math.rad(-60), math.min(math.rad(60), -math.rad(sneaking*25) + math.rad(damageTime*1.5) + math.rad(walkAnim*getMagnitudeXZ(torso.Velocity)*5/(1+sneaking)))), 0, 0), 0.15)
- rH.C0 = rH.C0:lerp(CFrame.new(0, 0.975, 0) * CFrame.Angles(math.max(math.rad(-60), math.min(math.rad(60), math.rad(sneaking*25) + math.rad(damageTime*1.5) + math.rad(walkAnim*getMagnitudeXZ(torso.Velocity)*5/(1+sneaking)))), 0, 0), 0.15)
- --
- --rootJoint.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
- --print(math.abs(head.Orientation.Y) - math.abs(humRootPart.Orientation.Y))
- --if (head.Orientation.Y * 2) - (head.Orientation.Y + torso.Orientation.Y) > 45 then
- --humRootPart.CFrame = humRootPart.CFrame * CFrame.Angles(0, math.rad(-45 + head.Orientation.Y), 0)
- --print("-45")
- --end
- --if (head.Orientation.Y * 2) - (head.Orientation.Y + torso.Orientation.Y) < -45 then
- --humRootPart.CFrame = humRootPart.CFrame * CFrame.Angles(0, math.rad(45 + head.Orientation.Y), 0)
- --print("45")
- --end
- --move these arms
- rootJoint.C1 = rootJoint.C1:lerp(CFrame.new(0, 0.325, 0) * CFrame.Angles(math.rad(sneaking*25), math.rad(punchRotY), 0), 0.2)
- rootJoint.C1 = rootJoint.C1:lerp(CFrame.new(0, 0.325, 0) * CFrame.Angles(math.rad(sneaking*25), math.rad(punchRotY), 0), 0.2)
- lS.C0 = lS.C0:lerp(CFrame.new(-0.325, 0.975, 0) * CFrame.Angles(math.max(math.rad(-60), math.min(math.rad(60), idleAnimRotX/20 + math.rad(punchRotX) + math.rad(damageTime*1.5) + math.rad(walkAnim*getMagnitudeXZ(torso.Velocity)*5/(1+sneaking)))), 0, math.rad(punchRotZ) + idleAnimRotZ/20), 0.025+(math.min(1, getMagnitudeXZ(torso.Velocity))/12)*2 + divide(punchSpeed, 6) + hi)
- rS.C0 = rS.C0:lerp(CFrame.new(-0.325, 0.975, 0) * CFrame.Angles(math.max(math.rad(-60), math.min(math.rad(60), idleAnimRotX/20 + math.rad(damageTime*1.5) + math.rad(walkAnim*getMagnitudeXZ(torso.Velocity)*5/(1+sneaking)))), 0, idleAnimRotZ/20), 0.025+(math.min(1, getMagnitudeXZ(torso.Velocity))/12)*2)
- if punching == 1 and punchEnded == 1 then
- punching = 0
- --print("steve uses punch!!")
- local coPunch = coroutine.wrap(function()
- punchEnded = 0
- punchSpeed = 1
- punchRotX = -60
- punchRotY = -8
- punchRotZ = -35
- wait(0.075)
- punchSpeed = 1
- punchRotX = -75
- punchRotY = 8
- punchRotZ = 40
- wait(0.075)
- punchSpeed = 1
- punchRotX = -20
- punchRotZ = 40
- wait(0.075)
- punchSpeed = 3.5
- punchRotX = 0
- punchRotY = 0
- punchRotZ = 0
- punchEnded = 1
- wait(0.06)
- punchSpeed = 0
- end)
- coPunch()
- end
- if ticks > 20 then
- ticks = 0
- if times == 0 then
- times = times + 1
- idleAnimRotX = -1
- idleAnimRotZ = 0
- elseif times == 1 then
- times = times + 1
- idleAnimRotX = -0.75
- idleAnimRotZ = -0.75
- elseif times == 2 then
- times = times + 1
- idleAnimRotX = 0
- idleAnimRotZ = -1
- elseif times == 3 then
- times = times + 1
- idleAnimRotX = 0.75
- idleAnimRotZ = -0.75
- --idleAnimRotX = 0.75
- --idleAnimRotZ = -0
- elseif times == 4 then
- times = times + 1
- idleAnimRotX = 1
- idleAnimRotZ = 0
- --idleAnimRotX = 1
- --idleAnimRotZ = 0
- elseif times == 5 then
- times = times + 1
- idleAnimRotX = 0.75
- idleAnimRotZ = 0.75
- elseif times == 6 then
- times = times + 1
- idleAnimRotX = 0
- idleAnimRotZ = 1
- elseif times == 7 then
- times = 0
- idleAnimRotX = -0.75
- idleAnimRotZ = 0.75
- end
- end
- if hi == 1 then hi = 0 end
- ticks = ticks + 1
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement