Advertisement
Filipono120

[ROBLOX] Brick Hill Script

Oct 20th, 2020 (edited)
2,717
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 10.19 KB | None | 0 0
  1. --Brick Hill Script
  2. --Written by filipono120 studios
  3.  
  4. local function Script()
  5.     -- Locals
  6.     local plr = game.Players.LocalPlayer
  7.     local character = plr.Character or plr.CharacterAdded:Wait()
  8.     local mouse = plr:GetMouse()
  9.  
  10.     --Settings
  11.     local Action = nil;
  12.     local Equipped = nil;
  13.  
  14.     --Motor6D
  15.     local LS = character.Torso["Left Shoulder"]
  16.     local RS = character.Torso["Right Shoulder"]
  17.     local LH = character.Torso["Left Hip"]
  18.     local RH = character.Torso["Right Hip"]
  19.  
  20.     --Functions
  21.     local function DestroyAnimator()
  22.         character["Humanoid"].Animator:Destroy()
  23.         character["Animate"]:Destroy()
  24.     end
  25.     local function TweenAnimate(Weld, Style, Direction, WeldCFrame, Time)
  26.         local Info = TweenInfo.new(Time, Enum.EasingStyle[Style], Enum.EasingDirection[Direction])
  27.         local Tween = game:GetService("TweenService"):Create(Weld, Info, {C0 = Weld.C0 * WeldCFrame})
  28.         Tween:Play()
  29.         Tween.Completed:Wait()
  30.         return Tween
  31.     end
  32.     local function TweenAnimateV3(Weld, Style, Direction, WeldCFrame, Time)
  33.         local Info = TweenInfo.new(Time, Enum.EasingStyle[Style], Enum.EasingDirection[Direction])
  34.         local Tween = game:GetService("TweenService"):Create(Weld, Info, {C0 = WeldCFrame})
  35.         Tween:Play()
  36.         Tween.Completed:Wait()
  37.         return Tween
  38.     end
  39.     local function TweenAnimateV2(Weld, Style, Direction, WeldCFrame, Time)
  40.         local Info = TweenInfo.new(Time, Enum.EasingStyle[Style], Enum.EasingDirection[Direction])
  41.         local Tween = game:GetService("TweenService"):Create(Weld, Info, {C0 = Weld.C0 * WeldCFrame})
  42.         Tween:Play()
  43.         return Tween
  44.     end
  45.     local function ResetMotor()
  46.         RS.C0 = CFrame.new(0.993, 0.5, 0) * CFrame.Angles(math.rad(0), math.rad(90), math.rad(0))
  47.         LS.C0 = CFrame.new(-0.993, 0.5, 0) * CFrame.Angles(math.rad(0), math.rad(-90), math.rad(0))
  48.         RH.C0 = CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(0), math.rad(90), math.rad(0))
  49.         LH.C0 = CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(0), math.rad(-90), math.rad(0))
  50.     end
  51.     local function Equip()
  52.         RS.C0 = CFrame.new(0.993, 0.5, 0) * CFrame.Angles(math.rad(90), math.rad(90), math.rad(0))
  53.     end
  54.     local function Jump()
  55.         ResetMotor()
  56.         RS.C0 = CFrame.new(0.993, 0.5, 0) * CFrame.Angles(math.rad(180), math.rad(90), math.rad(0))
  57.         LS.C0 = CFrame.new(-0.993, 0.5, 0) * CFrame.Angles(math.rad(180), math.rad(-90), math.rad(0))
  58.     end
  59.  
  60.     --Netting players with network access
  61.     local NetworkAccess = coroutine.create(function()
  62.         settings().Physics.AllowSleep = false
  63.         while true do
  64.             game:GetService('RunService').RenderStepped:Wait()
  65.             for _, players in pairs(game.Players:GetChildren()) do
  66.                 if players ~= game.Players.LocalPlayer then
  67.                     players.MaximumSimulationRadius = 0.1
  68.                     players.SimulationRadius = 0
  69.                 end
  70.             end
  71.             plr.MaximumSimulationRadius = math.pow(math.huge, math.huge)
  72.             plr.SimulationRadius = math.huge * math.huge
  73.         end
  74.     end)
  75.  
  76.     coroutine.resume(NetworkAccess)
  77.  
  78.     --Destroying Default Animation
  79.     wait(1 / 60)
  80.     DestroyAnimator()
  81.  
  82.     --HumanoidSettings
  83.     workspace.Gravity = 90.228
  84.     character.Humanoid.JumpPower = 80
  85.  
  86.     --RBXScriptSignal Events
  87.  
  88.     --| Humanoid Events
  89.     character.Humanoid.StateChanged:Connect(function(old, new)
  90.         if (new == Enum.HumanoidStateType.Running) then
  91.             Action = "Running"
  92.         elseif (old == Enum.HumanoidStateType.Running and new == Enum.HumanoidStateType.Running) then
  93.             Action = "Running"
  94.         elseif (new == Enum.HumanoidStateType.Landed) then
  95.             Action = "NaN"
  96.         elseif (new == Enum.HumanoidStateType.Jumping) then
  97.             Action = "Jumping"
  98.         elseif (new == Enum.HumanoidStateType.Freefall) then
  99.             Action = "Jumping"
  100.         end
  101.     end)
  102.    
  103.     character.Humanoid.Running:Connect(function(speed)
  104.         if speed <= 0 then
  105.             Action = "Idle"
  106.         end
  107.     end)
  108.  
  109.     --Brick Hill Gui
  110.  
  111.     function sandbox(var,func)
  112.         local env = getfenv(func)
  113.         local newenv = setmetatable({},{
  114.             __index = function(self,k)
  115.                 if k=="script" then
  116.                     return var
  117.                 else
  118.                     return env[k]
  119.                 end
  120.             end,
  121.         })
  122.         setfenv(func,newenv)
  123.         return func
  124.     end
  125.     cors = {}
  126.     mas = Instance.new("Model",game:GetService("Lighting"))
  127.     ScreenGui0 = Instance.new("ScreenGui")
  128.     Frame1 = Instance.new("Frame")
  129.     Frame2 = Instance.new("Frame")
  130.     LocalScript3 = Instance.new("LocalScript")
  131.     Frame4 = Instance.new("Frame")
  132.     UIGridLayout5 = Instance.new("UIGridLayout")
  133.     LocalScript6 = Instance.new("LocalScript")
  134.     TextButton7 = Instance.new("TextButton")
  135.     ScreenGui0.Name = "BrickHillUI"
  136.     ScreenGui0.Parent = mas
  137.     ScreenGui0.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  138.     Frame1.Name = "CoreHealth"
  139.     Frame1.Parent = ScreenGui0
  140.     Frame1.Position = UDim2.new(0.973000011, 0, 0.850000024, 0)
  141.     Frame1.Size = UDim2.new(0, 26, 0, 195)
  142.     Frame1.AnchorPoint = Vector2.new(0.5, 0.5)
  143.     Frame1.BackgroundColor = BrickColor.new("Really red")
  144.     Frame1.BackgroundColor3 = Color3.new(1, 0, 0)
  145.     Frame1.BorderSizePixel = 2
  146.     Frame2.Name = "ProgressBar"
  147.     Frame2.Parent = Frame1
  148.     Frame2.Position = UDim2.new(0, 0, 0, 195)
  149.     Frame2.Size = UDim2.new(0, 26, -1, 0)
  150.     Frame2.BackgroundColor = BrickColor.new("Lime green")
  151.     Frame2.BackgroundColor3 = Color3.new(0.333333, 1, 0)
  152.     Frame2.BorderSizePixel = 0
  153.     LocalScript3.Name = "HealthBarScript"
  154.     LocalScript3.Parent = Frame1
  155.     table.insert(cors,sandbox(LocalScript3,function()
  156.         --//CoreGui
  157.         game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Health, false)
  158.  
  159.         --//Variables
  160.         local plr = game.Players.LocalPlayer
  161.         local char = plr.Character or plr.CharacterAdded:Wait()
  162.         local humanoid = char:WaitForChild("Humanoid")
  163.         local health = script.Parent
  164.  
  165.         --//Health
  166.         humanoid:GetPropertyChangedSignal("Health"):Connect(function()
  167.             local healthChange = humanoid.Health / humanoid.MaxHealth
  168.             health.ProgressBar:TweenSize(UDim2.new(0, 26, -healthChange, 0), Enum.EasingDirection.In, Enum.EasingStyle.Exponential, 0)
  169.         end)
  170.     end))
  171.     Frame4.Name = "CoreBackpack"
  172.     Frame4.Parent = ScreenGui0
  173.     Frame4.Position = UDim2.new(0, 0, 0.869791687, 0)
  174.     Frame4.Size = UDim2.new(0, 999, 0, 100)
  175.     Frame4.BackgroundColor = BrickColor.new("Institutional white")
  176.     Frame4.BackgroundColor3 = Color3.new(1, 1, 1)
  177.     Frame4.BackgroundTransparency = 1
  178.     UIGridLayout5.Parent = Frame4
  179.     LocalScript6.Name = "BackpackHandler"
  180.     LocalScript6.Parent = ScreenGui0
  181.     table.insert(cors,sandbox(LocalScript6,function()
  182.         --//CoreGui
  183.         game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
  184.  
  185.         --//Variables
  186.         local Items = {};
  187.         local Frames = {};
  188.         local Equipped = nil;
  189.         local Player = game.Players.LocalPlayer
  190.         local Character = Player.Character or Player.CharacterAdded:Wait()
  191.  
  192.         local function Scan(Location)
  193.             for index, v in pairs(Location:GetChildren()) do
  194.                 if v:IsA("Tool") then
  195.                     table.insert(Items, v)
  196.                 end
  197.             end
  198.         end
  199.  
  200.         local function Update()
  201.             for index, v in pairs(Frames) do
  202.                 v:Destroy()
  203.             end
  204.             for index, v in pairs(Items) do
  205.                 local sam = script.Sample:Clone()
  206.                 sam.Name = v.Name
  207.                 sam.LayoutOrder = index
  208.                 sam.Parent = script.Parent.CoreBackpack
  209.                 sam.Text = v.Name
  210.                 table.insert(Frames, sam)
  211.                 if Equipped == nil then
  212.                     sam.BorderSizePixel = 2
  213.                 end
  214.                 sam.MouseButton1Click:Connect(function()
  215.                     if Equipped == nil or Equipped ~= v then
  216.                         Character.Humanoid:UnequipTools()
  217.                         wait()
  218.                         Character.Humanoid:EquipTool(v)
  219.                         Equipped = v
  220.                     else
  221.                         Character.Humanoid:UnequipTools()
  222.                         Equipped = nil
  223.                     end
  224.                 end)
  225.             end
  226.         end
  227.  
  228.         local function OnBackPackChanged()
  229.             Items = {}
  230.             Scan(Character)
  231.             Scan(Player.Backpack)
  232.             Update()
  233.         end
  234.  
  235.         OnBackPackChanged()
  236.  
  237.         Player.Backpack.ChildAdded:Connect(OnBackPackChanged)
  238.         Player.Backpack.ChildRemoved:Connect(OnBackPackChanged)
  239.         Character.ChildAdded:Connect(OnBackPackChanged)
  240.         Character.ChildRemoved:Connect(OnBackPackChanged)
  241.     end))
  242.     TextButton7.Name = "Sample"
  243.     TextButton7.Parent = LocalScript6
  244.     TextButton7.Size = UDim2.new(0, 100, 0, 100)
  245.     TextButton7.BackgroundColor = BrickColor.new("Really black")
  246.     TextButton7.BackgroundColor3 = Color3.new(0, 0, 0)
  247.     TextButton7.BackgroundTransparency = 0.30000001192093
  248.     TextButton7.Font = Enum.Font.Arial
  249.     TextButton7.FontSize = Enum.FontSize.Size14
  250.     TextButton7.Text = "ItemSample"
  251.     TextButton7.TextColor = BrickColor.new("Institutional white")
  252.     TextButton7.TextColor3 = Color3.new(1, 1, 1)
  253.     TextButton7.TextScaled = true
  254.     TextButton7.TextSize = 14
  255.     TextButton7.TextWrap = true
  256.     TextButton7.TextWrapped = true
  257.     for i,v in pairs(mas:GetChildren()) do
  258.         v.Parent = game:GetService("Players").LocalPlayer.PlayerGui
  259.         pcall(function() v:MakeJoints() end)
  260.     end
  261.     mas:Destroy()
  262.     for i,v in pairs(cors) do
  263.         spawn(function()
  264.             pcall(v)
  265.         end)
  266.     end
  267.  
  268.     character.Humanoid.Died:Connect(function()
  269.         ScreenGui0:Destroy()
  270.         game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, true)
  271.         game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Health, true)
  272.     end)
  273.  
  274.     --Animation Engine
  275.     while true do
  276.         wait()
  277.         if Action == "Running" then
  278.             TweenAnimateV2(RS, "Back", "Out", CFrame.Angles(0, 0, math.rad(50)), .33)
  279.             TweenAnimateV2(RH, "Back", "Out", CFrame.Angles(0, 0, math.rad(50)), .33)
  280.             TweenAnimateV2(LH, "Back", "Out", CFrame.Angles(0, 0, math.rad(50)), .33)
  281.             TweenAnimate(LS, "Back", "Out", CFrame.Angles(0, 0, math.rad(50)), .33)
  282.             TweenAnimateV2(RS, "Back", "Out", CFrame.Angles(0, 0, math.rad(-50)), .33)
  283.             TweenAnimateV2(RH, "Back", "Out", CFrame.Angles(0, 0, math.rad(-50)), .33)
  284.             TweenAnimateV2(LH, "Back", "Out", CFrame.Angles(0, 0, math.rad(-50)), .33)
  285.             TweenAnimate(LS, "Back", "Out", CFrame.Angles(0, 0, math.rad(-50)), .33)
  286.             TweenAnimateV2(RS, "Back", "Out", CFrame.Angles(0, 0, math.rad(-50)), .33)
  287.             TweenAnimateV2(RH, "Back", "Out", CFrame.Angles(0, 0, math.rad(-50)), .33)
  288.             TweenAnimateV2(LH, "Back", "Out", CFrame.Angles(0, 0, math.rad(-50)), .33)
  289.             TweenAnimate(LS, "Back", "Out", CFrame.Angles(0, 0, math.rad(-50)), .33)
  290.             TweenAnimateV2(RS, "Back", "Out", CFrame.Angles(0, 0, math.rad(50)), .33)
  291.             TweenAnimateV2(RH, "Back", "Out", CFrame.Angles(0, 0, math.rad(50)), .33)
  292.             TweenAnimateV2(LH, "Back", "Out", CFrame.Angles(0, 0, math.rad(50)), .33)
  293.             TweenAnimate(LS, "Back", "Out", CFrame.Angles(0, 0, math.rad(50)), .33)
  294.         elseif Action == "Idle" then
  295.             ResetMotor()
  296.         elseif Action == "NaN" then
  297.             ResetMotor()
  298.         elseif Action == "Jumping" then
  299.             Jump()
  300.         end
  301.     end
  302. end
  303.  
  304. wait(1 / 60)
  305. Script()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement