Advertisement
InTesting

Tiny test

Feb 4th, 2019
1,863
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 11.84 KB | None | 0 0
  1. -- Instructions:
  2. --[[
  3. Any local variables with :
  4.  = LocalPlayer:
  5.     Must be replaced with "owner". So if your local variable is game.Players.LocalPlayer , replace it with owner
  6.  = :GetMouse():
  7.     Remove the variable entirely.
  8.  
  9. then paste this over the desired script
  10. --]]
  11. print('https://pastebin.com/3tYZzjq4')
  12. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  13. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  14. do
  15.     print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  16.     script.Parent = Player.Character
  17.  
  18.     --RemoteEvent for communicating
  19.     local Event = Instance.new("RemoteEvent")
  20.     Event.Name = "UserInput_Event"
  21.     --Fake event to make stuff like Mouse.KeyDown work
  22.     local function fakeEvent()
  23.         local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  24.         t.connect = t.Connect
  25.         return t
  26.     end
  27.     --Creating fake input objects with fake variables
  28.     local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  29.     local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  30.     local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  31.         CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  32.     end}
  33.     --Merged 2 functions into one by checking amount of arguments
  34.     CAS.UnbindAction = CAS.BindAction
  35.  
  36.     --This function will trigger the events that have been :Connect()'ed
  37.     local function te(self,ev,...)
  38.         local t = m[ev]
  39.         if t and t._fakeEvent and t.Function then
  40.             t.Function(...)
  41.         end
  42.     end
  43.     m.TrigEvent = te
  44.     UIS.TrigEvent = te
  45.     Event.OnServerEvent:Connect(function(plr,io)
  46.         if plr~=Player then return end
  47.         if io.isMouse then
  48.             m.Target = io.Target
  49.             m.Hit = io.Hit
  50.         else
  51.             local b = io.UserInputState == Enum.UserInputState.Begin
  52.             if io.UserInputType == Enum.UserInputType.MouseButton1 then
  53.                 return m:TrigEvent(b and "Button1Down" or "Button1Up")
  54.             end
  55.             for _,t in pairs(CAS.Actions) do
  56.                 for _,k in pairs(t.Keys) do
  57.                     if k==io.KeyCode then
  58.                         t.Function(t.Name,io.UserInputState,io)
  59.                     end
  60.                 end
  61.             end
  62.             m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  63.             UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  64.         end
  65.     end)
  66.     Event.Parent = NLS([==[
  67.     local Player = game:GetService("Players").LocalPlayer
  68.     local Event = script:WaitForChild("UserInput_Event")
  69.     local UIS = game:GetService("UserInputService")
  70.     local input = function(io,a)
  71.         if a then return end
  72.         --Since InputObject is a client-side instance, we create and pass table instead
  73.         Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  74.     end
  75.     UIS.InputBegan:Connect(input)
  76.     UIS.InputEnded:Connect(input)
  77.     local Mouse = Player:GetMouse()
  78.     local h,t
  79.     --Give the server mouse data 30 times every second, but only if the values changed
  80.     --If player is not moving their mouse, client won't fire events
  81.     while wait(1/30) do
  82.         if h~=Mouse.Hit or t~=Mouse.Target then
  83.             h,t=Mouse.Hit,Mouse.Target
  84.             Event:FireServer({isMouse=true,Target=t,Hit=h})
  85.         end
  86.     end]==],Player.Character)
  87.     Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  88. end
  89. -- End of FE converter
  90. print("Tiny Script by CHL (SoftlockedUnderZero)")
  91. print("Void Script Builder Dis: CggyhDE ")
  92. print("Link to script for you to keep: https://pastebin.com/3tYZzjq4")
  93. print("Updates:")
  94. print(" - Tiny House.")
  95. print(" - Stand on someone's head = E")
  96.  
  97. local char = owner.Character
  98. local onPerson = false
  99. local host = nil
  100. function weldparts(part1,part2)
  101.     local weldc = Instance.new("WeldConstraint",part1)
  102.     weldc.Name = "weld12pts"
  103.     weldc.Part0 = part1
  104.     weldc.Part1 = part2
  105. end
  106. if char then
  107.     wait(.1)
  108.     local CCH = char:GetChildren()
  109.     if char["Left Arm"].Size.Y == 2 then
  110.         for i, v in pairs(CCH) do
  111.             if v:IsA("Part") and v.Name~="Head" then
  112.                 v.Size = Vector3.new(v.Size.X*.5,v.Size.Y*.5,v.Size.Z*.5)
  113.             end
  114.         end
  115.     end
  116.     local torso = char:FindFirstChild("Torso")
  117.     if char["Left Arm"].Size.Y == 1 then
  118.         if torso then
  119.             torso.Orientation = Vector3.new(0,0,0)
  120.             torso["Right Shoulder"].C1 = CFrame.new(0.25,.5,0) * CFrame.fromOrientation(0,math.rad(90),0)
  121.             torso["Left Shoulder"].C1 = CFrame.new(-0.25,.5,0)* CFrame.fromOrientation(0,math.rad(-90),0)
  122.             torso["Left Hip"].C1 = CFrame.new(-0.75,0,0) * CFrame.fromOrientation(0,math.rad(-90),0)
  123.             torso["Right Hip"].C1 = CFrame.new(0.75,0,0) * CFrame.fromOrientation(0,math.rad(90),0)
  124.             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))
  125.         end
  126.     end
  127.  
  128.     char.Humanoid.WalkSpeed = 8
  129.     char.Humanoid.JumpPower = 25
  130.     if workspace:FindFirstChild("Tiny House") then
  131.     else
  132.         local house = Instance.new("Model",game.Workspace)
  133.         house.Name = "Tiny House"
  134.         local wall1 = Instance.new("Part",house)
  135.         wall1.Position = Vector3.new(63.5, 3.5, -31.5)
  136.         wall1.Orientation= Vector3.new(0, -180, 180)
  137.         wall1.Size = Vector3.new(9, 5, 1)
  138.    
  139.         local wall2 = Instance.new("Part",house)
  140.         wall2.Position = Vector3.new(67.5, 3.5, -28)
  141.         wall2.Orientation= Vector3.new(0, -180, 180)
  142.         wall2.Size = Vector3.new(1, 5, 6)
  143.    
  144.         local wall3 = Instance.new("Part",house)
  145.         wall3.Position = Vector3.new(63.5, 3.5, -24.5)
  146.         wall3.Orientation= Vector3.new(0, -180, 180)
  147.         wall3.Size = Vector3.new(9, 5, 1)
  148.    
  149.         local wall4 = Instance.new("Part",house)
  150.         wall4.Position = Vector3.new(59.5, 3.5, -26.75)
  151.         wall4.Orientation= Vector3.new(0, -180, 180)
  152.         wall4.Size = Vector3.new(1, 5, 3.5)
  153.    
  154.         local wall5 = Instance.new("Part",house)
  155.         wall5.Position = Vector3.new(59.5, 5.25, -29.75)
  156.         wall5.Orientation= Vector3.new(0, -180, 180)
  157.         wall5.Size = Vector3.new(1, 1.5, 2.5)
  158.    
  159.         local wall6 = Instance.new("Part",house)
  160.         wall6.Position = Vector3.new(63.5, 6.5, -28)
  161.         wall6.Orientation= Vector3.new(0, -180, 180)
  162.         wall6.Size = Vector3.new(9, 1, 8)
  163.    
  164.         local wall7 = Instance.new("Part",house)
  165.         wall7.Position = Vector3.new(63.5, 0.5, -28)
  166.         wall7.Orientation= Vector3.new(0, -180, 180)
  167.         wall7.Size = Vector3.new(9, 1, 8)
  168.    
  169.         local hCh = house:GetChildren()
  170.         for _, v in pairs(hCh) do
  171.             v.Anchored =true
  172.         end
  173.         for _,v in pairs(hCh) do
  174.             v.BrickColor = BrickColor.new("CGA brown")
  175.             v.Material = Enum.Material.WoodPlanks
  176.             wait(.25)
  177.         end
  178.    
  179.         local roof1 = Instance.new("WedgePart",house)
  180.         roof1.Anchored = true
  181.         roof1.Position = Vector3.new(63.5, 8.495, -30)
  182.         roof1.BrickColor = BrickColor.new("Medium stone grey")
  183.         roof1.Material = Enum.Material.Brick
  184.         roof1.Size = Vector3.new(9, 3, 4)
  185.         roof1.BrickColor = BrickColor.new("Really red")
  186.    
  187.         local roof2 = Instance.new("WedgePart",house)
  188.         roof2.Anchored = true
  189.         roof2.Position = Vector3.new(63.5, 8.495, -26)
  190.         roof2.BrickColor = BrickColor.new("Medium stone grey")
  191.         roof2.Material = Enum.Material.Brick
  192.         roof2.Size = Vector3.new(9, 3, 4)
  193.         roof2.Orientation = Vector3.new(0,180,0)
  194.         roof2.BrickColor = BrickColor.new("Really red")
  195.  
  196.         local couchmod= Instance.new("Model",house)
  197.         couchmod.Name = "Couch"
  198.    
  199.         local cFloor = Instance.new("Part",couchmod)
  200.         cFloor.Position = Vector3.new(66, 1.5, -28)
  201.         cFloor.Orientation = Vector3.new(0, 0, 0)
  202.         cFloor.Size = Vector3.new(2, 1, 6)
  203.        
  204.         local cFloor2 = Instance.new("Part",couchmod)
  205.         cFloor2.Position = Vector3.new(66.75, 2.5, -28)
  206.         cFloor2.Orientation = Vector3.new(0, 0, 0)
  207.         cFloor2.Size = Vector3.new(0.5, 3, 6)
  208.    
  209.         local cFloor3 = Instance.new("Part",couchmod)
  210.         cFloor3.Position = Vector3.new(66, 1.875, -25.25)
  211.         cFloor3.Orientation = Vector3.new(0, 0, 0)
  212.         cFloor3.Size = Vector3.new(2, 1.75, 0.5)
  213.    
  214.         local cFloor4 = Instance.new("Part",couchmod)
  215.         cFloor4.Position = Vector3.new(66, 1.875, -30.75)
  216.         cFloor4.Orientation = Vector3.new(0, 0, 0)
  217.         cFloor4.Size = Vector3.new(2, 1.75, 0.5)
  218.    
  219.         local cmCh = couchmod:GetChildren()
  220.         for _, v in pairs(cmCh) do
  221.             v.BrickColor = BrickColor.new("Really red")
  222.             v.Anchored = true
  223.             v.Material = Enum.Material.Fabric
  224.         end
  225.     end
  226.     char.Humanoid.Seated:Connect(function(bool)
  227.         if bool==true then
  228.             torso.Orientation = Vector3.new(0,0,0)
  229.             torso["Right Shoulder"].C1 = CFrame.new(0.25,.25,-.25) * CFrame.fromOrientation(0,math.rad(90),0)
  230.             torso["Left Shoulder"].C1 = CFrame.new(-0.25,.25,-.25)* CFrame.fromOrientation(0,math.rad(-90),0)
  231.             torso["Left Hip"].C1 = CFrame.new(-0.75,.5,.5) * CFrame.fromOrientation(0,math.rad(-90),0)
  232.             torso["Right Hip"].C1 = CFrame.new(0.75,.5,.5) * CFrame.fromOrientation(0,math.rad(90),0)
  233.         else
  234.             torso.Orientation = Vector3.new(0,0,0)
  235.             torso["Right Shoulder"].C1 = CFrame.new(0.25,.5,0) * CFrame.fromOrientation(0,math.rad(90),0)
  236.             torso["Left Shoulder"].C1 = CFrame.new(-0.25,.5,0)* CFrame.fromOrientation(0,math.rad(-90),0)
  237.             torso["Left Hip"].C1 = CFrame.new(-0.75,0,0) * CFrame.fromOrientation(0,math.rad(-90),0)
  238.             torso["Right Hip"].C1 = CFrame.new(0.75,0,0) * CFrame.fromOrientation(0,math.rad(90),0)
  239.         end
  240.     end)
  241.     mouse.KeyDown:Connect(function(key)
  242.         if key=="e" then
  243.             if onPerson==false then
  244.                 local mt = mouse.Target
  245.                 if mt==nil then
  246.                 elseif mt.Parent:IsA("Accessory") then
  247.                     local per = mt.Parent.Parent
  248.                     if per:FindFirstChild("Head") and char:FindFirstChild("HumanoidRootPart") and char:FindFirstChildWhichIsA("Humanoid") and game.Players:FindFirstChild(per.Name) then
  249.                         char.HumanoidRootPart.CFrame=per.Head.CFrame * CFrame.new(0,(per.Head.Size.Y*.5) + 1.5,0)
  250.                         weldparts(char.HumanoidRootPart,per.Head)
  251.                         char.Humanoid.PlatformStand = true
  252.                         local cCc = char:GetChildren()
  253.                         for _,v in pairs(cCc) do
  254.                             if v:IsA("MeshPart") or v:IsA("Part") then
  255.                                 v.Massless = true
  256.                             end
  257.                         end
  258.                         host = per.Name
  259.                         onPerson=true
  260.                     else
  261.                         print("Uh oh!")
  262.                     end
  263.                 elseif mt.Parent:FindFirstChildWhichIsA("Humanoid") then
  264.                     local per = mt.Parent
  265.                     if per:FindFirstChild("Head") and char:FindFirstChild("HumanoidRootPart") and char:FindFirstChildWhichIsA("Humanoid") and game.Players:FindFirstChild(per.Name) then
  266.                         char.HumanoidRootPart.CFrame=per.Head.CFrame * CFrame.new(0,(per.Head.Size.Y*.5) + 1.5,0)
  267.                         weldparts(char.HumanoidRootPart,per.Head)
  268.                         char.Humanoid.PlatformStand = true
  269.                         local cCc = char:GetChildren()
  270.                         for _,v in pairs(cCc) do
  271.                             if v:IsA("MeshPart") or v:IsA("Part") then
  272.                                 v.Massless = true
  273.                             end
  274.                         end
  275.                         host = per.Name
  276.                         onPerson=true
  277.                     else
  278.                         print("Uh oh!")
  279.                     end            
  280.                 end
  281.             else
  282.                 local cCc = char:GetChildren()
  283.                 for _,v in pairs(cCc) do
  284.                     if v:IsA("MeshPart") or v:IsA("Part") then
  285.                         v.Massless = false
  286.                     end
  287.                 end
  288.                 char.Humanoid.PlatformStand = false
  289.                 char.HumanoidRootPart:FindFirstChild("weld12pts"):Destroy()
  290.                 host = nil
  291.                 onPerson =false
  292.             end
  293.         end
  294.     end)
  295.     char.Humanoid.Died:Connect(function()
  296.         if workspace:FindFirstChild("Tiny House") then
  297.             workspace:FindFirstChild("Tiny House"):Destroy()
  298.         end
  299.         if onPerson==true then
  300.             if game.PlaceId==843495510 or owner.UserId==710232008 then
  301.                 local hostc = game.Workspace:FindFirstChild(host)
  302.                 if hostc:FindFirstChild("Humanoid") then
  303.                     hostc:FindFirstChild("Humanoid").Health = 0
  304.                 elseif hostc:FindFirstChild("Head") then
  305.                     hostc:FindFirstChild("Head"):Destroy()
  306.                 elseif hostc:FindFirstChild("UpperTorso") then
  307.                     hostc:FindFirstChild("UpperTorso"):Destroy()
  308.                 elseif hostc:FindFirstChild("Torso") then
  309.                     hostc:FindFirstChild("Torso"):Destroy()
  310.                 end
  311.             end
  312.         end
  313.     end)
  314. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement