Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Lucky Block Script not working? Please help i dont know whats wrong ddddddddddddd?

Asked by
TNTIsLyfe 152
4 years ago

I made this lucky block script for my lucky block so it does a random thing but nothing works at all can u tell me what did i do wrong? Script:

script.Parent.Activated:Connect(function(player)
script.Parent:Destroy()
local Roar = math.random(1,30)
if Roar == 1 or 2 or 3 or 4 or 5 then 
player.Character.Humanoid.MaxHealth = 1000
elseif Roar == 6 or 7 or 8 or 9 or 10 then
game.ServerStorage.Nothing:Clone().Parent = player.PlayerGui wait (2)
player.PlayerGui.Nothing:Destroy()
elseif Roar == 11 or 12 or 13 or 14 or 15 then
player.Character.Humanoid.Health = 0
elseif Roar == 16 then
game.ServerStorage["LUCKY SWORD :O"]:Clone().Parent = player.BackPack
elseif Roar == 17 or 18 or 19 or 20 then
game.ServerStorage.Blame.TextLabel = "Blame"..player.Name.."for this"
for _, v in pairs(game.Players:GetChildren()) do
game.ServerStorage.Blame:Clone().Parent = v.PlayerGui

wait (2)
v.PlayerGui.Blame:Destroy()
end
local ShrekStorm = game.Lighting["Shrek (emerald lucky block)"]:Clone()
ShrekStorm.Parent = game.Workspace
ShrekStorm:MakeJoints()
wait (0.2)
local ShrekStorm = game.Lighting["Shrek (emerald lucky block)"]:Clone()
ShrekStorm.Parent = game.Workspace
ShrekStorm:MakeJoints()
wait (0.2)
local ShrekStorm = game.Lighting["Shrek (emerald lucky block)"]:Clone()
ShrekStorm.Parent = game.Workspace
ShrekStorm:MakeJoints()
wait (0.2)
local ShrekStorm = game.Lighting["Shrek (emerald lucky block)"]:Clone()
ShrekStorm.Parent = game.Workspace
ShrekStorm:MakeJoints()
wait (0.2)
local ShrekStorm = game.Lighting["Shrek (emerald lucky block)"]:Clone()
ShrekStorm.Parent = game.Workspace
ShrekStorm:MakeJoints()
wait (0.2)
local ShrekStorm = game.Lighting["Shrek (emerald lucky block)"]:Clone()
ShrekStorm.Parent = game.Workspace
ShrekStorm:MakeJoints()
wait (0.2)
local ShrekStorm = game.Lighting["Shrek (emerald lucky block)"]:Clone()
ShrekStorm.Parent = game.Workspace
ShrekStorm:MakeJoints()
wait (0.2)
local ShrekStorm = game.Lighting["Shrek (emerald lucky block)"]:Clone()
ShrekStorm.Parent = game.Workspace
ShrekStorm:MakeJoints()
wait (0.2)
local ShrekStorm = game.Lighting["Shrek (emerald lucky block)"]:Clone()
ShrekStorm.Parent = game.Workspace
ShrekStorm:MakeJoints()
wait (0.2)
local ShrekStorm = game.Lighting["Shrek (emerald lucky block)"]:Clone()
ShrekStorm.Parent = game.Workspace
ShrekStorm:MakeJoints()
elseif Roar == 21 or 22 or 23 or 24 or 25 then
script.Parent:Clone().Parent = player.Backpack
script.Parent:Clone().Parent = player.Backpack
script.Parent:Clone().Parent = player.Backpack
elseif Roar == 26 or 27 or 28 or 29 or 30 then
local TNT = true
wait (10)
TNT = false
while TNT == true do
local Clone = game.Workspace.RealTNT:Clone()
Clone.Parent = game.Workspace
local TNTSpot = math.random(1,42)
if TNTSpot == 1 then
Clone.CFrame = game.Workspace.TNT1.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 2 then
Clone.CFrame = game.Workspace.TNT2.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 3 then
Clone.CFrame = game.Workspace.TNT3.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 4 then
Clone.CFrame = game.Workspace.TNT..TNTSpot.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 5 then
Clone.CFrame = game.Workspace.TNT..TNTSpot.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 6 then
Clone.CFrame = game.Workspace.TNT..TNTSpot.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 7 then
Clone.CFrame = game.Workspace.TNT..TNTSpot.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 8 then
Clone.CFrame = game.Workspace.TNT..TNTSpot.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 9 then
Clone.CFrame = game.Workspace.TNT..TNTSpot.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 10 then
Clone.CFrame = game.Workspace.TNT..TNTSpot.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 11 then
Clone.CFrame = game.Workspace.TNT..TNTSpot.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 12 then
Clone.CFrame = game.Workspace.TNT..TNTSpot.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 13 then
Clone.CFrame = game.Workspace.TNT..TNTSpot.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 14 then
Clone.CFrame = game.Workspace.TNT..TNTSpot.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 15 then
Clone.CFrame = game.Workspace.TNT..TNTSpot.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 16 then
Clone.CFrame = game.Workspace.TNT..TNTSpot.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 17 then
Clone.CFrame = game.Workspace.TNT..TNTSpot.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 18 then
Clone.CFrame = game.Workspace.TNT..TNTSpot.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 19 then
Clone.CFrame = game.Workspace.TNT..TNTSpot.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 20 then
Clone.CFrame = game.Workspace.TNT..TNTSpot.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 21 then
Clone.CFrame = game.Workspace.TNT..TNTSpot.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 22 then
Clone.CFrame = game.Workspace.TNT..TNTSpot.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 23 then
Clone.CFrame = game.Workspace.TNT..TNTSpot.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 24 then
Clone.CFrame = game.Workspace.TNT..TNTSpot.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 25 then
Clone.CFrame = game.Workspace.TNT..TNTSpot.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 26 then
Clone.CFrame = game.Workspace.TNT..TNTSpot.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 27 then
Clone.CFrame = game.Workspace.TNT..TNTSpot.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 28 then
Clone.CFrame = game.Workspace.TNT..TNTSpot.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 29 then
Clone.CFrame = game.Workspace.TNT..TNTSpot.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 30 then
Clone.CFrame = game.Workspace.TNT..TNTSpot.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 31 then
Clone.CFrame = game.Workspace.TNT..TNTSpot.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 32 then
Clone.CFrame = game.Workspace.TNT..TNTSpot.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 33 then
Clone.CFrame = game.Workspace.TNT..TNTSpot.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 34 then
Clone.CFrame = game.Workspace.TNT..TNTSpot.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 35 then
Clone.CFrame = game.Workspace.TNT..TNTSpot.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 36 then
Clone.CFrame = game.Workspace.TNT..TNTSpot.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 37 then
Clone.CFrame = game.Workspace.TNT..TNTSpot.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 38 then
Clone.CFrame = game.Workspace.TNT..TNTSpot.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 39 then
Clone.CFrame = game.Workspace.TNT..TNTSpot.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 40 then
Clone.CFrame = game.Workspace.TNT..TNTSpot.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 41 then
Clone.CFrame = game.Workspace.TNT..TNTSpot.CFrame * CFrame.new(0,-5,0)
elseif TNTSpot == 42 then
Clone.CFrame = game.Workspace.TNT..TNTSpot.CFrame * CFrame.new(0,-5,0)







end


end







end







end)

I would thank you if u helpoed me

0
my eyes are popping HappyTimIsHim 652 — 4y
0
Don't use Lighting, it is easily exploitable. Geobloxia 251 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

Put the tools that you want the players to get in ReplicatedStorage

Also what would be helpful is to print the random number you got. fx.

print(Roar)

Also if it is in a normal script then you get the character like this:

local char = game.Workspace:FindFirstChild(player.name)

and use a wait function too.

Very simple mistakes :D

0
i did put the tools in serverstorage Why replicatedstorage? TNTIsLyfe 152 — 4y
0
Huh im putting print but its not printing the number for some reason TNTIsLyfe 152 — 4y
0
Oh also there is a error with the giving scripts something about local player and random backpacks and stuff TNTIsLyfe 152 — 4y
0
Maybe make it wait maxpax2009 340 — 4y
View all comments (9 more)
0
ReplicatedStorage is designed for cloning items as in its name. ServerStorage is okay, but sometimes doesn't work. Don't use Lighting though, it is easily exploitable. Geobloxia 251 — 4y
0
its not the item problem its the player.backpack problem it shows a error with that TNTIsLyfe 152 — 4y
0
there is this error in the giving thing about the character = nil and print still doesnt show even with wait TNTIsLyfe 152 — 4y
0
hm ok i managed to fix the print problem but i dont understand why the features dont work TNTIsLyfe 152 — 4y
0
Is it in a local script? maxpax2009 340 — 4y
0
:/ that is a stupid question :/// TNTIsLyfe 152 — 4y
0
uh max i dont need the character :/ TNTIsLyfe 152 — 4y
0
Uh yeah, if you are setting the tool's parent is equal to the player then you also need the character. maxpax2009 340 — 4y
0
ok but why doesnt other stuff work atleast TNTIsLyfe 152 — 4y
Ad

Answer this question