Back to Scripts
Tower troll 2
ScriptBlox
Free
Game: Troll Tower 2 🖐
148
Views
1
Likes
0
Dislikes
ChebMami
offline
Features
this script contains
-Infinite jump
-auto shiftlock
Mqde by Bandito149J
Script Code
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local TweenService = game:GetService("TweenService")
local player = Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
------------------------------
-- Helper function
------------------------------
local function createUICorner(parent, radius)
local corner = Instance.new("UICorner")
corner.CornerRadius = UDim.new(0, radius)
corner.Parent = parent
return corner
end
local function createButton(parent, text, size, position)
local btn = Instance.new("TextButton")
btn.Size = size
btn.Position = position
btn.BackgroundColor3 = Color3.fromRGB(45,45,55)
btn.TextColor3 = Color3.fromRGB(255,255,255)
btn.TextScaled = true
btn.Font = Enum.Font.GothamSemibold
btn.Text = text
createUICorner(btn, 12)
btn.Parent = parent
-- Hover animation
btn.MouseEnter:Connect(function()
TweenService:Create(btn, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(60,60,70)}):Play()
end)
btn.MouseLeave:Connect(function()
TweenService:Create(btn, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(45,45,55)}):Play()
end)
return btn
end
------------------------------
-- ScreenGui
------------------------------
local gui = Instance.new("ScreenGui")
gui.Name = "TrollTower2Hub"
gui.ResetOnSpawn = false
gui.Parent = playerGui
------------------------------
-- GUI 1 (Splash)
------------------------------
local gui1 = Instance.new("Frame")
gui1.Size = UDim2.new(0,480,0,360)
gui1.AnchorPoint = Vector2.new(0.5,0.5)
gui1.Position = UDim2.new(0.5,0,0.5,0)
gui1.BackgroundColor3 = Color3.fromRGB(25,25,30)
createUICorner(gui1,16)
gui1.Parent = gui
-- Arc-en-ciel Gradient
local grad = Instance.new("UIGradient")
grad.Color = ColorSequence.new{
ColorSequenceKeypoint.new(0, Color3.fromRGB(255,0,0)),
ColorSequenceKeypoint.new(0.17, Color3.fromRGB(255,128,0)),
ColorSequenceKeypoint.new(0.33, Color3.fromRGB(255,255,0)),
ColorSequenceKeypoint.new(0.5, Color3.fromRGB(0,255,0)),
ColorSequenceKeypoint.new(0.67, Color3.fromRGB(0,255,255)),
ColorSequenceKeypoint.new(0.83, Color3.fromRGB(0,0,255)),
ColorSequenceKeypoint.new(1, Color3.fromRGB(255,0,255))
}
grad.Rotation = 0
grad.Parent = gui1
-- Animate Gradient
task.spawn(function()
while gui1.Parent do
grad.Rotation = (grad.Rotation + 1) % 360
RunService.RenderStepped:Wait()
end
end)
-- Title
local splashText = Instance.new("TextLabel")
splashText.Size = UDim2.new(0.8,0,0.2,0)
splashText.AnchorPoint = Vector2.new(0.5,0.5)
splashText.Position = UDim2.new(0.5,0,0.4,0)
splashText.BackgroundTransparency = 1
splashText.Font = Enum.Font.GothamBold
splashText.TextScaled = true
splashText.TextColor3 = Color3.fromRGB(255,255,255)
splashText.Text = "ZiakX Hub"
splashText.Parent = gui1
-- Start Button
local startBtn = createButton(gui1,"Start",UDim2.new(0,200,0,60),UDim2.new(0.5,-100,0.65,0))
startBtn.AnchorPoint = Vector2.new(0,0)
------------------------------
-- GUI 2 (Main)
------------------------------
local gui2 = Instance.new("Frame")
gui2.Size = UDim2.new(0,480,0,360)
gui2.AnchorPoint = Vector2.new(0.5,0.5)
gui2.Position = UDim2.new(0.5,0,0.5,0)
gui2.BackgroundColor3 = Color3.fromRGB(25,25,30)
createUICorner(gui2,16)
gui2.Visible = false
gui2.Parent = gui
-- Make GUI2 draggable
gui2.Active = true
gui2.Draggable = true
-- Title Troll Tower 2
local title = Instance.new("TextLabel")
title.Size = UDim2.new(1,-20,0,60)
title.Position = UDim2.new(0,10,0,10)
title.BackgroundTransparency = 1
title.Font = Enum.Font.GothamBold
title.TextScaled = true
title.TextColor3 = Color3.new(1,1,1)
title.Text = "Troll Tower 2"
title.Parent = gui2
-- Buttons: Infinite Jump & Shiftlock
local infBtn = createButton(gui2,"Infinite Jump",UDim2.new(0,180,0,50),UDim2.new(0.5,-190,1,-70))
infBtn.AnchorPoint = Vector2.new(0,1)
local shiftBtn = createButton(gui2,"Shiftlock",UDim2.new(0,180,0,50),UDim2.new(0.5,10,1,-70))
shiftBtn.AnchorPoint = Vector2.new(0,1)
-- Discord label + logo
local discordFrame = Instance.new("Frame")
discordFrame.Size = UDim2.new(0,300,0,30)
discordFrame.AnchorPoint = Vector2.new(0.5,1)
discordFrame.Position = UDim2.new(0.5,0,1,-20)
discordFrame.BackgroundTransparency = 1
discordFrame.Parent = gui2
local discordLogo = Instance.new("ImageLabel")
discordLogo.Size = UDim2.new(0,30,1,0)
discordLogo.Position = UDim2.new(0,0,0,0)
discordLogo.BackgroundTransparency = 1
discordLogo.Image = "rbxassetid://10351640719" -- Exemple logo Discord
discordLogo.Parent = discordFrame
local discordLbl = Instance.new("TextLabel")
discordLbl.Size = UDim2.new(1,-35,1,0)
discordLbl.Position = UDim2.new(0,35,0,0)
discordLbl.BackgroundTransparency = 1
discordLbl.Font = Enum.Font.Gotham
discordLbl.TextScaled = true
discordLbl.TextColor3 = Color3.fromRGB(114,137,218)
discordLbl.Text = "Discord.gg/ZiakXhub"
discordLbl.TextXAlignment = Enum.TextXAlignment.Left
discordLbl.Parent = discordFrame
-- Left buttons: Credits & Terms
local creditsBtn = createButton(gui2,"Credits",UDim2.new(0,160,0,50),UDim2.new(0,20,0,100))
local termsBtn = createButton(gui2,"Terms and Use",UDim2.new(0,160,0,50),UDim2.new(0,20,0,165))
-- Popup
local popup = Instance.new("Frame")
popup.Size = UDim2.new(0,340,0,200)
popup.AnchorPoint = Vector2.new(0.5,0.5)
popup.Position = UDim2.new(0.5,0,0.5,0)
popup.BackgroundColor3 = Color3.fromRGB(18,18,22)
popup.Visible = false
popup.Parent = gui
createUICorner(popup,12)
local popupText = Instance.new("TextLabel")
popupText.Size = UDim2.new(1,-20,1,-60)
popupText.Position = UDim2.new(0,10,0,10)
popupText.BackgroundTransparency = 1
popupText.TextColor3 = Color3.new(1,1,1)
popupText.TextWrapped = true
popupText.TextScaled = true
popupText.Font = Enum.Font.Gotham
popupText.Parent = popup
local closeBtn = createButton(popup,"Close",UDim2.new(0.4,0,0,40),UDim2.new(0.5,0,1,-10))
closeBtn.AnchorPoint = Vector2.new(0.5,1)
closeBtn.Parent = popup
closeBtn.MouseButton1Click:Connect(function()
popup.Visible = false
end)
creditsBtn.MouseButton1Click:Connect(function()
popupText.Text = "@Blashyz\n@Bandito149J\n@POS0XO"
popup.Visible = true
end)
termsBtn.MouseButton1Click:Connect(function()
popupText.Text = "If you get banned from the game please contact Bandito149J on Discord!"
popup.Visible = true
end)
------------------------------
-- Button logic
------------------------------
startBtn.MouseButton1Click:Connect(function()
TweenService:Create(gui1, TweenInfo.new(0.5,Enum.EasingStyle.Quad,Enum.EasingDirection.Out),{BackgroundTransparency=1}):Play()
task.wait(0.5)
gui1:Destroy()
gui2.Visible = true
end)
-- Infinite Jump logic (works on mobile & PC)
local infiniteJumpEnabled = false
infBtn.MouseButton1Click:Connect(function()
infiniteJumpEnabled = not infiniteJumpEnabled
infBtn.Text = "Infinite Jump: "..(infiniteJumpEnabled and "ON" or "OFF")
end)
UserInputService.JumpRequest:Connect(function()
if infiniteJumpEnabled then
local char = player.Character
if char then
local hum = char:FindFirstChildOfClass("Humanoid")
if hum and hum.Health > 0 then
hum:ChangeState(Enum.HumanoidStateType.Jumping)
end
end
end
end)
-- Shiftlock placeholder (emulated camera lock)
local shiftLockEnabled = false
shiftBtn.MouseButton1Click:Connect(function()
shiftLockEnabled = not shiftLockEnabled
shiftBtn.Text = "Shiftlock: "..(shiftLockEnabled and "ON" or "OFF")
end)
Comments (0)
Please login to comment
Login with Discord
Loading comments...