Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local wizardHax = Instance.new("ScreenGui")
- local main = Instance.new("Frame")
- local title = Instance.new("TextLabel")
- local healthButton = Instance.new("TextButton")
- local funcButton = Instance.new("TextButton")
- local closeButton = Instance.new("TextButton")
- local healthGUI = Instance.new("Frame")
- local healthTitle = Instance.new("TextLabel")
- local targetBox = Instance.new("TextBox")
- local negateButton = Instance.new("TextButton")
- local numBox = Instance.new("TextBox")
- local errorTitle = Instance.new("TextLabel")
- local infoTarget = Instance.new("TextLabel")
- local infoNum = Instance.new("TextLabel")
- local addButton = Instance.new("TextButton")
- local setButton = Instance.new("TextButton")
- local closeButton_2 = Instance.new("TextButton")
- local funcGUI = Instance.new("Frame")
- local TextLabel = Instance.new("TextLabel")
- local closeButton_3 = Instance.new("TextButton")
- local funcButton1 = Instance.new("TextButton")
- local funcButton3 = Instance.new("TextButton")
- local funcButton6 = Instance.new("TextButton")
- local funcButton4 = Instance.new("TextButton")
- local funcButton9 = Instance.new("TextButton")
- local funcButton7 = Instance.new("TextButton")
- local funcButton2 = Instance.new("TextButton")
- local funcButton5 = Instance.new("TextButton")
- local funcButton8 = Instance.new("TextButton")
- local openButton = Instance.new("Frame")
- local openButton_2 = Instance.new("TextButton")
- local autoBuyStuff = false -- auto buy stuff in your team
- local autoGetMoney = false -- auto get money
- local players = game.Players
- local LocalPlayer = players.LocalPlayer
- --Properties:
- wizardHax.Name = "wizardHax"
- wizardHax.Parent = game.CoreGui
- wizardHax.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- main.Name = "main"
- main.Parent = wizardHax
- main.BackgroundColor3 = Color3.fromRGB(85, 255, 127)
- main.BorderColor3 = Color3.fromRGB(170, 170, 255)
- main.BorderSizePixel = 3
- main.Position = UDim2.new(0.37714687, 0, 0.535626471, 0)
- main.Size = UDim2.new(0, 347, 0, 163)
- main.Visible = false
- main.Draggable = true
- main.Active = true
- title.Name = "title"
- title.Parent = main
- title.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- title.BackgroundTransparency = 1.000
- title.BorderSizePixel = 0
- title.Position = UDim2.new(0.239193082, 0, 0.0552147254, 0)
- title.Size = UDim2.new(0, 180, 0, 45)
- title.Font = Enum.Font.Fantasy
- title.Text = "wizardHaxs"
- title.TextColor3 = Color3.fromRGB(0, 100, 147)
- title.TextScaled = true
- title.TextSize = 14.000
- title.TextWrapped = true
- healthButton.Name = "healthButton"
- healthButton.Parent = main
- healthButton.BackgroundColor3 = Color3.fromRGB(255, 219, 11)
- healthButton.BorderColor3 = Color3.fromRGB(0, 170, 255)
- healthButton.Position = UDim2.new(0.0547550432, 0, 0.589695632, 0)
- healthButton.Size = UDim2.new(0, 130, 0, 41)
- healthButton.Font = Enum.Font.SourceSans
- healthButton.Text = "Health editor"
- healthButton.TextColor3 = Color3.fromRGB(0, 0, 0)
- healthButton.TextSize = 14.000
- healthButton.MouseButton1Down:Connect(function()
- healthGUI.Visible = not healthGUI.Visible
- end)
- funcButton.Name = "funcButton"
- funcButton.Parent = main
- funcButton.BackgroundColor3 = Color3.fromRGB(255, 219, 11)
- funcButton.BorderColor3 = Color3.fromRGB(0, 170, 255)
- funcButton.Position = UDim2.new(0.570605218, 0, 0.589695692, 0)
- funcButton.Size = UDim2.new(0, 130, 0, 41)
- funcButton.Font = Enum.Font.SourceSans
- funcButton.Text = "Functions"
- funcButton.TextColor3 = Color3.fromRGB(0, 0, 0)
- funcButton.TextSize = 14.000
- funcButton.MouseButton1Down:Connect(function()
- funcGUI.Visible = not funcGUI.Visible
- end)
- closeButton.Name = "closeButton"
- closeButton.Parent = main
- closeButton.BackgroundColor3 = Color3.fromRGB(0, 255, 127)
- closeButton.BorderColor3 = Color3.fromRGB(0, 255, 127)
- closeButton.Position = UDim2.new(0.864185095, 0, 0.023779586, 0)
- closeButton.Size = UDim2.new(0, 41, 0, 41)
- closeButton.Font = Enum.Font.SourceSans
- closeButton.Text = "X"
- closeButton.TextColor3 = Color3.fromRGB(0, 0, 0)
- closeButton.TextScaled = true
- closeButton.TextSize = 14.000
- closeButton.TextWrapped = true
- closeButton.MouseButton1Down:Connect(function()
- main.Visible = not main.Visible
- openButton.Visible = not openButton.Visible
- end)
- healthGUI.Name = "healthGUI"
- healthGUI.Parent = wizardHax
- healthGUI.BackgroundColor3 = Color3.fromRGB(255, 255, 127)
- healthGUI.Position = UDim2.new(0.144607827, 0, 0.175675675, 0)
- healthGUI.Size = UDim2.new(0, 502, 0, 234)
- healthGUI.Visible = false
- healthGUI.Draggable = true
- healthGUI.Active = true
- healthTitle.Name = "healthTitle"
- healthTitle.Parent = healthGUI
- healthTitle.BackgroundColor3 = Color3.fromRGB(255, 255, 127)
- healthTitle.BackgroundTransparency = 1.000
- healthTitle.BorderColor3 = Color3.fromRGB(255, 255, 127)
- healthTitle.Position = UDim2.new(-0.000687420368, 0, -0.00215985253, 0)
- healthTitle.Size = UDim2.new(0, 203, 0, 40)
- healthTitle.Font = Enum.Font.SourceSans
- healthTitle.Text = "Health editor"
- healthTitle.TextColor3 = Color3.fromRGB(108, 108, 108)
- healthTitle.TextScaled = true
- healthTitle.TextSize = 14.000
- healthTitle.TextWrapped = true
- targetBox.Name = "targetBox"
- targetBox.Parent = healthGUI
- targetBox.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- targetBox.Position = UDim2.new(0.0586269498, 0, 0.235597119, 0)
- targetBox.Size = UDim2.new(0, 303, 0, 33)
- targetBox.Font = Enum.Font.SourceSans
- targetBox.PlaceholderText = "Targets"
- targetBox.Text = ""
- targetBox.TextColor3 = Color3.fromRGB(0, 0, 0)
- targetBox.TextSize = 14.000
- targetBox.ClearTextOnFocus = false
- negateButton.Name = "negateButton"
- negateButton.Parent = healthGUI
- negateButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- negateButton.Position = UDim2.new(0.419776827, 0, 0.745437801, 0)
- negateButton.Size = UDim2.new(0, 80, 0, 39)
- negateButton.Font = Enum.Font.SourceSans
- negateButton.Text = "Negate"
- negateButton.TextColor3 = Color3.fromRGB(0, 0, 0)
- negateButton.TextScaled = true
- negateButton.TextSize = 14.000
- negateButton.TextWrapped = true
- negateButton.MouseButton1Down:Connect(function()
- if not tonumber(numBox.Text) then
- return
- end
- local targets = getSelector(targetBox.Text)
- for i,player in pairs(targets) do
- print(player.Name)
- local rb = player.Character.HumanoidRootPart
- local pos = rb.CFrame
- local vel = rb.Velocity
- shootWand(pos.x+vel.x/3,pos.y+vel.y/3,pos.z+vel.z/3,tonumber(numBox.Text))
- end
- end)
- numBox.Name = "numBox"
- numBox.Parent = healthGUI
- numBox.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- numBox.Position = UDim2.new(0.706429899, 0, 0.235597134, 0)
- numBox.Size = UDim2.new(0, 114, 0, 33)
- numBox.Font = Enum.Font.SourceSans
- numBox.PlaceholderText = "Number"
- numBox.Text = ""
- numBox.TextColor3 = Color3.fromRGB(0, 0, 0)
- numBox.TextSize = 14.000
- numBox.ClearTextOnFocus = false
- errorTitle.Name = "errorTitle"
- errorTitle.Parent = healthGUI
- errorTitle.BackgroundColor3 = Color3.fromRGB(255, 255, 127)
- errorTitle.BorderColor3 = Color3.fromRGB(77, 116, 116)
- errorTitle.Position = UDim2.new(0.219123438, 0, 0.487179488, 0)
- errorTitle.Size = UDim2.new(0, 270, 0, 37)
- errorTitle.Visible = false
- errorTitle.Font = Enum.Font.SourceSans
- errorTitle.Text = ""
- errorTitle.TextColor3 = Color3.fromRGB(255, 0, 0)
- errorTitle.TextSize = 14.000
- errorTitle.TextWrapped = true
- infoTarget.Name = "infoTarget"
- infoTarget.Parent = healthGUI
- infoTarget.BackgroundColor3 = Color3.fromRGB(255, 255, 127)
- infoTarget.Position = UDim2.new(0.0231629014, 0, 0.423076928, 0)
- infoTarget.Size = UDim2.new(0, 84, 0, 68)
- infoTarget.Font = Enum.Font.SourceSans
- infoTarget.Text = "Put a comma after each name to add multiple targets"
- infoTarget.TextColor3 = Color3.fromRGB(0, 0, 0)
- infoTarget.TextSize = 14.000
- infoTarget.TextWrapped = true
- infoNum.Name = "infoNum"
- infoNum.Parent = healthGUI
- infoNum.BackgroundColor3 = Color3.fromRGB(255, 255, 127)
- infoNum.Position = UDim2.new(0.784119129, 0, 0.427350432, 0)
- infoNum.Size = UDim2.new(0, 75, 0, 33)
- infoNum.Font = Enum.Font.SourceSans
- infoNum.Text = "Put inf to make infinite"
- infoNum.TextColor3 = Color3.fromRGB(0, 0, 0)
- infoNum.TextSize = 14.000
- infoNum.TextWrapped = true
- addButton.Name = "addButton"
- addButton.Parent = healthGUI
- addButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- addButton.Position = UDim2.new(0.188701123, 0, 0.741164267, 0)
- addButton.Size = UDim2.new(0, 80, 0, 39)
- addButton.Font = Enum.Font.SourceSans
- addButton.Text = "Add"
- addButton.TextColor3 = Color3.fromRGB(0, 0, 0)
- addButton.TextScaled = true
- addButton.TextSize = 14.000
- addButton.TextWrapped = true
- addButton.MouseButton1Down:Connect(function()
- if not tonumber(numBox.Text) then
- return
- end
- local targets = getSelector(targetBox.Text)
- for i,player in pairs(targets) do
- print(player.Name)
- local rb = player.Character.HumanoidRootPart
- local pos = rb.CFrame
- local vel = rb.Velocity
- shootWand(pos.x+vel.x/3,pos.y+vel.y/3,pos.z+vel.z/3,-tonumber(numBox.Text))
- end
- end)
- setButton.Name = "setButton"
- setButton.Parent = healthGUI
- setButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- setButton.Position = UDim2.new(0.642884374, 0, 0.741164267, 0)
- setButton.Size = UDim2.new(0, 80, 0, 39)
- setButton.Font = Enum.Font.SourceSans
- setButton.Text = "Set"
- setButton.TextColor3 = Color3.fromRGB(0, 0, 0)
- setButton.TextScaled = true
- setButton.TextSize = 14.000
- setButton.TextWrapped = true
- setButton.MouseButton1Down:Connect(function()
- if not tonumber(numBox.Text) then
- return
- end
- local targets = getSelector(targetBox.Text)
- for i,player in pairs(targets) do
- print(player.Name)
- local rb = player.Character.HumanoidRootPart
- local pos = rb.CFrame
- local vel = rb.Velocity
- shootWand(pos.x+vel.x/3,pos.y+vel.y/3,pos.z+vel.z/3,-tonumber(numBox.Text)+player.Character.Humanoid.Health)
- end
- end)
- closeButton_2.Name = "closeButton"
- closeButton_2.Parent = healthGUI
- closeButton_2.BackgroundColor3 = Color3.fromRGB(255, 255, 127)
- closeButton_2.BorderColor3 = Color3.fromRGB(255, 255, 127)
- closeButton_2.Position = UDim2.new(0.901649058, 0, 0.0299145579, 0)
- closeButton_2.Size = UDim2.new(0, 41, 0, 41)
- closeButton_2.Font = Enum.Font.SourceSans
- closeButton_2.Text = "X"
- closeButton_2.TextColor3 = Color3.fromRGB(0, 0, 0)
- closeButton_2.TextScaled = true
- closeButton_2.TextSize = 14.000
- closeButton_2.TextWrapped = true
- closeButton_2.MouseButton1Down:Connect(function()
- healthGUI.Visible = not healthGUI.Visible
- end)
- funcGUI.Name = "funcGUI"
- funcGUI.Parent = wizardHax
- funcGUI.BackgroundColor3 = Color3.fromRGB(255, 180, 28)
- funcGUI.Position = UDim2.new(0.0849672928, 0, 0.583538115, 0)
- funcGUI.Size = UDim2.new(0, 291, 0, 187)
- funcGUI.Visible = false
- funcGUI.Draggable = true
- funcGUI.Active = true
- TextLabel.Parent = funcGUI
- TextLabel.BackgroundColor3 = Color3.fromRGB(255, 180, 28)
- TextLabel.BorderColor3 = Color3.fromRGB(0, 0, 0)
- TextLabel.Size = UDim2.new(0, 64, 0, 33)
- TextLabel.Font = Enum.Font.SourceSans
- TextLabel.Text = "Functions"
- TextLabel.TextColor3 = Color3.fromRGB(0, 0, 0)
- TextLabel.TextSize = 14.000
- closeButton_3.Name = "closeButton"
- closeButton_3.Parent = funcGUI
- closeButton_3.BackgroundColor3 = Color3.fromRGB(255, 180, 28)
- closeButton_3.BorderColor3 = Color3.fromRGB(255, 180, 28)
- closeButton_3.Position = UDim2.new(0.854735434, 0, 0.0352619998, 0)
- closeButton_3.Size = UDim2.new(0, 35, 0, 35)
- closeButton_3.Font = Enum.Font.SourceSans
- closeButton_3.Text = "X"
- closeButton_3.TextColor3 = Color3.fromRGB(0, 0, 0)
- closeButton_3.TextScaled = true
- closeButton_3.TextSize = 14.000
- closeButton_3.TextWrapped = true
- closeButton_3.MouseButton1Down:Connect(function()
- funcGUI.Visible = not funcGUI.Visible
- end)
- funcButton1.Name = "funcButton1"
- funcButton1.Parent = funcGUI
- funcButton1.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- funcButton1.Position = UDim2.new(0.0721649453, 0, 0.272727281, 0)
- funcButton1.Size = UDim2.new(0, 82, 0, 32)
- funcButton1.Font = Enum.Font.SourceSans
- funcButton1.Text = "Auto Get Money"
- funcButton1.TextColor3 = Color3.fromRGB(0, 0, 0)
- funcButton1.TextSize = 14.000
- funcButton1.MouseButton1Down:Connect(function()
- autoGetMoney = not autoGetMoney
- end)
- funcButton3.Name = "funcButton3"
- funcButton3.Parent = funcGUI
- funcButton3.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- funcButton3.Position = UDim2.new(0.646048129, 0, 0.272727281, 0)
- funcButton3.Size = UDim2.new(0, 82, 0, 32)
- funcButton3.Font = Enum.Font.SourceSans
- funcButton3.Text = "func 3"
- funcButton3.TextColor3 = Color3.fromRGB(0, 0, 0)
- funcButton3.TextSize = 14.000
- funcButton6.Name = "funcButton6"
- funcButton6.Parent = funcGUI
- funcButton6.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- funcButton6.Position = UDim2.new(0.646048129, 0, 0.524064183, 0)
- funcButton6.Size = UDim2.new(0, 82, 0, 32)
- funcButton6.Font = Enum.Font.SourceSans
- funcButton6.Text = "func 6"
- funcButton6.TextColor3 = Color3.fromRGB(0, 0, 0)
- funcButton6.TextSize = 14.000
- funcButton4.Name = "funcButton4"
- funcButton4.Parent = funcGUI
- funcButton4.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- funcButton4.Position = UDim2.new(0.0721649453, 0, 0.524064183, 0)
- funcButton4.Size = UDim2.new(0, 82, 0, 32)
- funcButton4.Font = Enum.Font.SourceSans
- funcButton4.Text = "func 4"
- funcButton4.TextColor3 = Color3.fromRGB(0, 0, 0)
- funcButton4.TextSize = 14.000
- funcButton9.Name = "funcButton9"
- funcButton9.Parent = funcGUI
- funcButton9.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- funcButton9.Position = UDim2.new(0.646048129, 0, 0.770053446, 0)
- funcButton9.Size = UDim2.new(0, 82, 0, 32)
- funcButton9.Font = Enum.Font.SourceSans
- funcButton9.Text = "func 9"
- funcButton9.TextColor3 = Color3.fromRGB(0, 0, 0)
- funcButton9.TextSize = 14.000
- funcButton7.Name = "funcButton7"
- funcButton7.Parent = funcGUI
- funcButton7.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- funcButton7.Position = UDim2.new(0.0721649453, 0, 0.770053446, 0)
- funcButton7.Size = UDim2.new(0, 82, 0, 32)
- funcButton7.Font = Enum.Font.SourceSans
- funcButton7.Text = "func 7"
- funcButton7.TextColor3 = Color3.fromRGB(0, 0, 0)
- funcButton7.TextSize = 14.000
- funcButton2.Name = "funcButton2"
- funcButton2.Parent = funcGUI
- funcButton2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- funcButton2.Position = UDim2.new(0.367697597, 0, 0.272727281, 0)
- funcButton2.Size = UDim2.new(0, 76, 0, 32)
- funcButton2.Font = Enum.Font.SourceSans
- funcButton2.Text = "Auto Buy Stuff"
- funcButton2.TextColor3 = Color3.fromRGB(0, 0, 0)
- funcButton2.TextSize = 14.000
- funcButton2.MouseButton1Down:Connect(function()
- autoBuyStuff = not autoBuyStuff
- end)
- funcButton5.Name = "funcButton5"
- funcButton5.Parent = funcGUI
- funcButton5.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- funcButton5.Position = UDim2.new(0.367697597, 0, 0.524064183, 0)
- funcButton5.Size = UDim2.new(0, 76, 0, 32)
- funcButton5.Font = Enum.Font.SourceSans
- funcButton5.Text = "func 5"
- funcButton5.TextColor3 = Color3.fromRGB(0, 0, 0)
- funcButton5.TextSize = 14.000
- funcButton8.Name = "funcButton8"
- funcButton8.Parent = funcGUI
- funcButton8.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- funcButton8.Position = UDim2.new(0.367697597, 0, 0.770053506, 0)
- funcButton8.Size = UDim2.new(0, 76, 0, 32)
- funcButton8.Font = Enum.Font.SourceSans
- funcButton8.Text = "func 8"
- funcButton8.TextColor3 = Color3.fromRGB(0, 0, 0)
- funcButton8.TextSize = 14.000
- openButton.Name = "openButton"
- openButton.Parent = wizardHax
- openButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- openButton.Position = UDim2.new(0.883169949, 0, 0.534398019, 0)
- openButton.Size = UDim2.new(0, 125, 0, 63)
- openButton.Draggable = true
- openButton.Active = true
- openButton_2.Name = "openButton"
- openButton_2.Parent = openButton
- openButton_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- openButton_2.BorderColor3 = Color3.fromRGB(0, 0, 0)
- openButton_2.Position = UDim2.new(0.0795714334, 0, 0.158888876, 0)
- openButton_2.Size = UDim2.new(0, 105, 0, 41)
- openButton_2.Font = Enum.Font.SourceSans
- openButton_2.Text = "Open"
- openButton_2.TextColor3 = Color3.fromRGB(0, 0, 0)
- openButton_2.TextScaled = true
- openButton_2.TextSize = 14.000
- openButton_2.TextWrapped = true
- openButton_2.MouseButton1Down:Connect(function()
- main.Visible = not main.Visible
- openButton.Visible = not openButton.Visible
- end)
- -- functions
- spawn(function()
- local players = game.Players
- local localplayer = players.LocalPlayer
- local team = localplayer.Team.Name
- local kit = game.Workspace:FindFirstChild("berezaa's Tycoon Kit")
- if not kit then
- return
- end
- local RedTeam
- local RedSecond
- local owner
- local Essentials
- local buttons
- local player
- local giver
- while not RedTeam do
- if team ~= "For Hire" then
- if team == "Blue" then
- RedTeam = kit:FindFirstChild("Pastel "..team)
- elseif team == "Yellow" then
- RedTeam = kit:FindFirstChild("Cool "..team:lower())
- else
- RedTeam = kit:FindFirstChild("Medium "..team:lower())
- end
- end
- wait(1)
- team = localplayer.Team.Name
- end
- if RedTeam[team.."First"].Gate.Head.Decal.Texture == 'http://www.roblox.com/Thumbs/Avatar.ashx?username='..localplayer.Name then
- RedSecond = RedTeam[team.."First"]
- owner = true
- else
- RedSecond = RedTeam[team.."Second"]
- end
- Essentials = RedTeam.Essentials
- buttons = RedSecond.Buttons:GetChildren()
- player = game.Players.LocalPlayer
- if owner then
- giver = Essentials.Giver
- else
- giver = Essentials.Giver2
- end
- -- auto buy stuff (it sucks it just tps everything to you and if you have enough money to buy it you buy it)
- spawn(function()
- while wait(1) do
- if autoBuyStuff then
- local character = player.Character
- for i,button in pairs(buttons) do
- local head = button:FindFirstChild("Head")
- if head and character and character:FindFirstChild("HumanoidRootPart") then
- local orginalTransparency = head.Transparency
- if orginalTransparency ~= 1 then
- local originalpos = head.CFrame
- head.CanCollide = false
- head.Transparency = 1
- head.CFrame = character.HumanoidRootPart.CFrame
- wait(0.01)
- head.CFrame = originalpos
- head.Transparency = orginalTransparency
- end
- end
- end
- end
- end
- end)
- -- tp the collect money pad to you
- spawn(function()
- while wait(1) do
- if autoGetMoney then
- local character = player.Character
- if character and character:FindFirstChild("HumanoidRootPart") then
- local originalpos = giver.CFrame
- giver.CanCollide = false
- giver.Transparency = 1
- giver.CFrame = character.HumanoidRootPart.CFrame
- wait(0.025)
- giver.CFrame = originalpos
- giver.Transparency = 0
- giver.CanCollide = true
- end
- end
- end
- end)
- end)
- function shootWand(x,y,z,damage)
- local character = LocalPlayer.Character
- if character then
- local wand = character:FindFirstChild("Wand")
- if not wand then
- wand = LocalPlayer.Backpack:FindFirstChild("Wand")
- if wand then
- LocalPlayer.Character.Humanoid:EquipTool(wand)
- wait(0.05)
- wand = character:FindFirstChild("Wand")
- spawn(function()
- wait(0.1)
- LocalPlayer.Character.Humanoid:UnequipTools(wand)
- end)
- else
- return
- end
- end
- if not wand then
- return
- end
- local tbl_main =
- {
- CFrame.new(x, y, z),
- 0,
- 0.1,
- wand,
- damage,
- character
- }
- wand.Fire:FireServer(unpack(tbl_main))
- wait(0.01)
- end
- end
- function shootPlayer(_player,damage)
- local character = LocalPlayer.Character
- if character then
- local wand = character:FindFirstChild("Wand")
- local pos = _player.Character.HumanoidRootPart.CFrame
- local vel = _player.Character.HumanoidRootPart.Velocity
- if not wand then
- wand = LocalPlayer.Backpack:FindFirstChild("Wand")
- if wand then
- LocalPlayer.Character.Humanoid:EquipTool(wand)
- wait(0.05)
- wand = character:FindFirstChild("Wand")
- spawn(function()
- wait(0.1)
- LocalPlayer.Character.Humanoid:UnequipTools(wand)
- end)
- else
- return
- end
- if not wand then
- return
- end
- end
- local tbl_main =
- {
- CFrame.new(pos.x+vel.x/5,pos.y+vel.y/5,pos.z+vel.z/5),
- 0,
- 0.1,
- wand,
- damage,
- character
- }
- wand.Fire:FireServer(unpack(tbl_main))
- wait(0.01)
- end
- end
- function getSelector(text)
- local selectors = {}
- for i,selector in pairs(string.split(text,",")) do
- if selector == "all" then
- for i,player in pairs(players:GetChildren()) do
- if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
- selectors[table.getn(selectors)+1] = player
- end
- end
- else
- for i,player in pairs(players:GetChildren()) do
- if startsWith(player.Name,selector) and player.Name ~= LocalPlayer.Name and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
- selectors[table.getn(selectors)+1] = player
- end
- end
- end
- end
- return selectors
- end
- function startsWith(text1,text2)
- if string.lower(string.sub(text1,1,#text2)) == string.lower(text2) then
- return true
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement