Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Instructions:
- --[[
- Any local variables with :
- = LocalPlayer:
- Must be replaced with "owner". So if your local variable is game.Players.LocalPlayer , replace it with owner
- = :GetMouse():
- Remove the variable entirely.
- then paste this over the desired script
- --]]
- print('https://pastebin.com/3tYZzjq4')
- 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
- -- End of FE converter
- print("Tiny Script by CHL (SoftlockedUnderZero)")
- print("Void Script Builder Dis: CggyhDE ")
- print("Link to script for you to keep: https://pastebin.com/3tYZzjq4")
- print("Updates:")
- print(" - Tiny House.")
- print(" - Stand on someone's head = E")
- local char = owner.Character
- local onPerson = false
- local host = nil
- function weldparts(part1,part2)
- local weldc = Instance.new("WeldConstraint",part1)
- weldc.Name = "weld12pts"
- weldc.Part0 = part1
- weldc.Part1 = part2
- end
- if char then
- wait(.1)
- local CCH = char:GetChildren()
- if char["Left Arm"].Size.Y == 2 then
- for i, v in pairs(CCH) do
- if v:IsA("Part") and v.Name~="Head" then
- v.Size = Vector3.new(v.Size.X*.5,v.Size.Y*.5,v.Size.Z*.5)
- end
- end
- end
- local torso = char:FindFirstChild("Torso")
- if char["Left Arm"].Size.Y == 1 then
- if torso then
- torso.Orientation = Vector3.new(0,0,0)
- torso["Right Shoulder"].C1 = CFrame.new(0.25,.5,0) * CFrame.fromOrientation(0,math.rad(90),0)
- torso["Left Shoulder"].C1 = CFrame.new(-0.25,.5,0)* CFrame.fromOrientation(0,math.rad(-90),0)
- torso["Left Hip"].C1 = CFrame.new(-0.75,0,0) * CFrame.fromOrientation(0,math.rad(-90),0)
- torso["Right Hip"].C1 = CFrame.new(0.75,0,0) * CFrame.fromOrientation(0,math.rad(90),0)
- torso["Neck"].C1 = CFrame.new(0,0,0) *CFrame.Angles(math.rad(torso.Orientation.X+90),math.rad(torso.Orientation.y+180),math.rad(torso.Orientation.Z))
- end
- end
- char.Humanoid.WalkSpeed = 8
- char.Humanoid.JumpPower = 25
- if workspace:FindFirstChild("Tiny House") then
- else
- local house = Instance.new("Model",game.Workspace)
- house.Name = "Tiny House"
- local wall1 = Instance.new("Part",house)
- wall1.Position = Vector3.new(63.5, 3.5, -31.5)
- wall1.Orientation= Vector3.new(0, -180, 180)
- wall1.Size = Vector3.new(9, 5, 1)
- local wall2 = Instance.new("Part",house)
- wall2.Position = Vector3.new(67.5, 3.5, -28)
- wall2.Orientation= Vector3.new(0, -180, 180)
- wall2.Size = Vector3.new(1, 5, 6)
- local wall3 = Instance.new("Part",house)
- wall3.Position = Vector3.new(63.5, 3.5, -24.5)
- wall3.Orientation= Vector3.new(0, -180, 180)
- wall3.Size = Vector3.new(9, 5, 1)
- local wall4 = Instance.new("Part",house)
- wall4.Position = Vector3.new(59.5, 3.5, -26.75)
- wall4.Orientation= Vector3.new(0, -180, 180)
- wall4.Size = Vector3.new(1, 5, 3.5)
- local wall5 = Instance.new("Part",house)
- wall5.Position = Vector3.new(59.5, 5.25, -29.75)
- wall5.Orientation= Vector3.new(0, -180, 180)
- wall5.Size = Vector3.new(1, 1.5, 2.5)
- local wall6 = Instance.new("Part",house)
- wall6.Position = Vector3.new(63.5, 6.5, -28)
- wall6.Orientation= Vector3.new(0, -180, 180)
- wall6.Size = Vector3.new(9, 1, 8)
- local wall7 = Instance.new("Part",house)
- wall7.Position = Vector3.new(63.5, 0.5, -28)
- wall7.Orientation= Vector3.new(0, -180, 180)
- wall7.Size = Vector3.new(9, 1, 8)
- local hCh = house:GetChildren()
- for _, v in pairs(hCh) do
- v.Anchored =true
- end
- for _,v in pairs(hCh) do
- v.BrickColor = BrickColor.new("CGA brown")
- v.Material = Enum.Material.WoodPlanks
- wait(.25)
- end
- local roof1 = Instance.new("WedgePart",house)
- roof1.Anchored = true
- roof1.Position = Vector3.new(63.5, 8.495, -30)
- roof1.BrickColor = BrickColor.new("Medium stone grey")
- roof1.Material = Enum.Material.Brick
- roof1.Size = Vector3.new(9, 3, 4)
- roof1.BrickColor = BrickColor.new("Really red")
- local roof2 = Instance.new("WedgePart",house)
- roof2.Anchored = true
- roof2.Position = Vector3.new(63.5, 8.495, -26)
- roof2.BrickColor = BrickColor.new("Medium stone grey")
- roof2.Material = Enum.Material.Brick
- roof2.Size = Vector3.new(9, 3, 4)
- roof2.Orientation = Vector3.new(0,180,0)
- roof2.BrickColor = BrickColor.new("Really red")
- local couchmod= Instance.new("Model",house)
- couchmod.Name = "Couch"
- local cFloor = Instance.new("Part",couchmod)
- cFloor.Position = Vector3.new(66, 1.5, -28)
- cFloor.Orientation = Vector3.new(0, 0, 0)
- cFloor.Size = Vector3.new(2, 1, 6)
- local cFloor2 = Instance.new("Part",couchmod)
- cFloor2.Position = Vector3.new(66.75, 2.5, -28)
- cFloor2.Orientation = Vector3.new(0, 0, 0)
- cFloor2.Size = Vector3.new(0.5, 3, 6)
- local cFloor3 = Instance.new("Part",couchmod)
- cFloor3.Position = Vector3.new(66, 1.875, -25.25)
- cFloor3.Orientation = Vector3.new(0, 0, 0)
- cFloor3.Size = Vector3.new(2, 1.75, 0.5)
- local cFloor4 = Instance.new("Part",couchmod)
- cFloor4.Position = Vector3.new(66, 1.875, -30.75)
- cFloor4.Orientation = Vector3.new(0, 0, 0)
- cFloor4.Size = Vector3.new(2, 1.75, 0.5)
- local cmCh = couchmod:GetChildren()
- for _, v in pairs(cmCh) do
- v.BrickColor = BrickColor.new("Really red")
- v.Anchored = true
- v.Material = Enum.Material.Fabric
- end
- end
- char.Humanoid.Seated:Connect(function(bool)
- if bool==true then
- torso.Orientation = Vector3.new(0,0,0)
- torso["Right Shoulder"].C1 = CFrame.new(0.25,.25,-.25) * CFrame.fromOrientation(0,math.rad(90),0)
- torso["Left Shoulder"].C1 = CFrame.new(-0.25,.25,-.25)* CFrame.fromOrientation(0,math.rad(-90),0)
- torso["Left Hip"].C1 = CFrame.new(-0.75,.5,.5) * CFrame.fromOrientation(0,math.rad(-90),0)
- torso["Right Hip"].C1 = CFrame.new(0.75,.5,.5) * CFrame.fromOrientation(0,math.rad(90),0)
- else
- torso.Orientation = Vector3.new(0,0,0)
- torso["Right Shoulder"].C1 = CFrame.new(0.25,.5,0) * CFrame.fromOrientation(0,math.rad(90),0)
- torso["Left Shoulder"].C1 = CFrame.new(-0.25,.5,0)* CFrame.fromOrientation(0,math.rad(-90),0)
- torso["Left Hip"].C1 = CFrame.new(-0.75,0,0) * CFrame.fromOrientation(0,math.rad(-90),0)
- torso["Right Hip"].C1 = CFrame.new(0.75,0,0) * CFrame.fromOrientation(0,math.rad(90),0)
- end
- end)
- mouse.KeyDown:Connect(function(key)
- if key=="e" then
- if onPerson==false then
- local mt = mouse.Target
- if mt==nil then
- elseif mt.Parent:IsA("Accessory") then
- local per = mt.Parent.Parent
- if per:FindFirstChild("Head") and char:FindFirstChild("HumanoidRootPart") and char:FindFirstChildWhichIsA("Humanoid") and game.Players:FindFirstChild(per.Name) then
- char.HumanoidRootPart.CFrame=per.Head.CFrame * CFrame.new(0,(per.Head.Size.Y*.5) + 1.5,0)
- weldparts(char.HumanoidRootPart,per.Head)
- char.Humanoid.PlatformStand = true
- local cCc = char:GetChildren()
- for _,v in pairs(cCc) do
- if v:IsA("MeshPart") or v:IsA("Part") then
- v.Massless = true
- end
- end
- host = per.Name
- onPerson=true
- else
- print("Uh oh!")
- end
- elseif mt.Parent:FindFirstChildWhichIsA("Humanoid") then
- local per = mt.Parent
- if per:FindFirstChild("Head") and char:FindFirstChild("HumanoidRootPart") and char:FindFirstChildWhichIsA("Humanoid") and game.Players:FindFirstChild(per.Name) then
- char.HumanoidRootPart.CFrame=per.Head.CFrame * CFrame.new(0,(per.Head.Size.Y*.5) + 1.5,0)
- weldparts(char.HumanoidRootPart,per.Head)
- char.Humanoid.PlatformStand = true
- local cCc = char:GetChildren()
- for _,v in pairs(cCc) do
- if v:IsA("MeshPart") or v:IsA("Part") then
- v.Massless = true
- end
- end
- host = per.Name
- onPerson=true
- else
- print("Uh oh!")
- end
- end
- else
- local cCc = char:GetChildren()
- for _,v in pairs(cCc) do
- if v:IsA("MeshPart") or v:IsA("Part") then
- v.Massless = false
- end
- end
- char.Humanoid.PlatformStand = false
- char.HumanoidRootPart:FindFirstChild("weld12pts"):Destroy()
- host = nil
- onPerson =false
- end
- end
- end)
- char.Humanoid.Died:Connect(function()
- if workspace:FindFirstChild("Tiny House") then
- workspace:FindFirstChild("Tiny House"):Destroy()
- end
- if onPerson==true then
- if game.PlaceId==843495510 or owner.UserId==710232008 then
- local hostc = game.Workspace:FindFirstChild(host)
- if hostc:FindFirstChild("Humanoid") then
- hostc:FindFirstChild("Humanoid").Health = 0
- elseif hostc:FindFirstChild("Head") then
- hostc:FindFirstChild("Head"):Destroy()
- elseif hostc:FindFirstChild("UpperTorso") then
- hostc:FindFirstChild("UpperTorso"):Destroy()
- elseif hostc:FindFirstChild("Torso") then
- hostc:FindFirstChild("Torso"):Destroy()
- end
- end
- end
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement