0% found this document useful (0 votes)
33 views12 pages

Bedwars Game Script Functions

Uploaded by

abhahaagey
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views12 pages

Bedwars Game Script Functions

Uploaded by

abhahaagey
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

local Players = game:GetService("Players")

local LocalPlayer = [Link]


local KnitClient =
[Link](require([Link]).setup, 6)
bedwars = {
["ClientHandlerStore"] =
require([Link]).ClientStore, ["SwordController"] =
[Link],
["CombatConstant"] =
require(game:GetService("ReplicatedStorage").[Link]["combat-
constant"]).CombatConstant,
["KnockbackTable"] =
[Link](require(game:GetService("ReplicatedStorage").[Link]["knockback-
util"]).[Link], 1),
["SprintController"] = [Link],
["DamageIndicator"] =
[Link]
}
function GetMatchState()
return bedwars["ClientHandlerStore"]:getState().[Link]
end
function IsAlive(plr)
plr = plr or LocalPlayer
if not [Link] then return false end
if not [Link]:FindFirstChild("Head") then return false end
if not [Link]:FindFirstChild("Humanoid") then return false
end
if [Link]:FindFirstChild("Humanoid").Health < 0.11 then
return false end
return true
end
function GetQueueType()
local state = bedwars["ClientHandlerStore"]:getState()
return [Link] or "bedwars_test"
end
function getserverpos(Position)
local x = [Link](Position.X/3)
local y = [Link](Position.Y/3)
local z = [Link](Position.Z/3)
return [Link](x,y,z)
end
local function GetInventory(plr)
if not plr then
return {items = {}, armor = {}}
end

local suc, ret = pcall(function()


return
require(game:GetService("ReplicatedStorage").[Link]["inventory-
util"]).[Link](plr)
end)

if not suc then


return {items = {}, armor = {}}
end
if [Link] and [Link]:FindFirstChild("InventoryFolder")
then
local invFolder =
[Link]:FindFirstChild("InventoryFolder").Value
if not invFolder then return ret end
for i,v in next, ret do
for i2, v2 in next, v do
if typeof(v2) == 'table' and [Link] then
[Link] =
invFolder:FindFirstChild([Link])
end
end
if typeof(v) == 'table' and [Link] then
[Link] = invFolder:FindFirstChild([Link])
end
end
end

return ret
end
local BedwarsSwords =
require(game:GetService("ReplicatedStorage").[Link]["bedwars-
swords"]).BedwarsMelees
function hashFunc(vec)
return {value = vec}
end
function getBeds()
local beds = {}
for i,v in pairs(game:GetService("Workspace"):GetChildren()) do
if [Link]([Link]) == "bed" and v:FindFirstChild("Covers")
~= nil and v:FindFirstChild("Covers").Color ~= [Link] then
[Link](beds,v)
end
end
return beds
end

local function getSword()


local highest, returning = -9e9, nil
for i,v in next, GetInventory(LocalPlayer).items do
local swords = [Link](BedwarsSwords, [Link])
if not swords then continue end
if swords > highest then
returning = v
highest = swords
end
end
return returning
end
local SwordAnimations = {
["Slow"] = {
{CFrame = [Link](0, 0, 0) * [Link]([Link](220),
[Link](100), [Link](100)),Time = 0.25},
{CFrame = [Link](0, 0, 0) * [Link]([Link](0),
[Link](0), [Link](0)), Time = 0.25}
}
}
local origC0 =
game:GetService("ReplicatedStorage").[Link].C0
spawn(function ()
EnabledKillaura = true
if EnabledKillaura then
CheckKillaura = true
repeat [Link]() until GetMatchState()
~= 0
if not EnabledKillaura then return end
while [Link]() do
for i, v in
pairs(game:GetService("Players"):GetChildren()) do
if [Link] ~= [Link]
and IsAlive(v) and IsAlive(LocalPlayer) and not
[Link]:FindFirstChildOfClass("ForceField") then
local Magnitude =
([Link]:FindFirstChild("HumanoidRootPart").Position -
[Link]:FindFirstChild("HumanoidRootPart").Position).Magnitude
if Magnitude < 30 then
Sword = getSword()
if Sword ~= nil
then

spawn(function()

local anim = [Link]("Animation")

[Link] = "rbxassetid://4947108314"

local loader =
[Link]:FindFirstChild("Humanoid"):FindFirstChild("Animator")

loader:LoadAnimation(anim):Play()

if CostumAnimations then

CostumAnimations = false

for i,v in pairs(SwordAnimations["Slow"]) do

game:GetService("TweenService"):Create([Link],TweenI
[Link]([Link]),{C0 = origC0 * [Link]}):Play()

[Link]([Link]-0.01)

end

CostumAnimations = true

end

game:GetService("ReplicatedStorage").rbxts_include.node_modules:FindFirstChild("@rb
xts").[Link]._NetManaged.SwordHit:FireServer({

["chargedAttack"] = {["chargeRatio"] = 0},

["entityInstance"] = [Link],

["validate"] = {

["targetPosition"] =
hashFunc([Link]:FindFirstChild("HumanoidRootPart").Position),
["selfPosition"] =
hashFunc([Link]:FindFirstChild("HumanoidRootPart").Position +
(([Link]:FindFirstChild("HumanoidRootPart").Position -
[Link]:FindFirstChild("HumanoidRootPart").Position).Magnitude > 14 and
([Link]([Link]:FindFirstChild("HumanoidRootPart").Position,
[Link]:FindFirstChild("HumanoidRootPart").Position).LookVector * 4) or
[Link](0, 0, 0))),

},

["weapon"] = [Link],

})

game:GetService("ReplicatedStorage").rbxts_include.node_modules:FindFirstChild("@rb
xts").[Link]._NetManaged.DragonBreath:FireServer({

["Player"] = game:GetService("Players").LocalPlayer

})
end)
end
end
end
end
end
end
end)
spawn(function ()
bedwars["KnockbackTable"]["kbDirectionStrength"] = 0
bedwars["KnockbackTable"]["kbUpwardStrength"] = 0
end)
spawn(function ()
EnabledNuker = true
if EnabledNuker then
repeat
[Link](0.1)
if IsAlive(LocalPlayer) and
[Link]:FindFirstChild("Humanoid").Health > 0.1 then
local beds = getBeds()
for i,v in pairs(beds) do
local mag = ([Link] -
[Link]:FindFirstChild("HumanoidRootPart").Position).Magnitude
if mag < 30 then
local params =
[Link]()
[Link] =
[Link]
[Link] =
true
local raycastResult =
game:GetService("Workspace"):Raycast([Link] +
[Link](0,24,0),[Link](0,-27,0),params)
if raycastResult then
local targetBlock
= nil
if
[Link] then
targetBlock
= [Link]
else
if not
[Link] then

targetBlock = v
end
end
for i, v in
pairs(targetBlock:GetChildren()) do
if
v:IsA("Texture") then

v:Destroy()
end
end

game:GetService("ReplicatedStorage").rbxts_include.node_modules:FindFirstChild("@ea
sy-games"):FindFirstChild("block-
engine").node_modules:FindFirstChild("@rbxts").[Link]._NetManaged.DamageBlock:Invo
keServer({
["blockRef"] = {

["blockPosition"] = getserverpos([Link])
},
["hitPosition"] =
getserverpos([Link]),
["hitNormal"] =
getserverpos([Link])
})
end
end
end
end
until not EnabledNuker
end
end)
spawn(function ()
EnabledAutoQueue = true
spawn(function()
repeat [Link](3) until GetMatchState() == 2 or not
EnabledAutoQueue
if not EnabledAutoQueue then return end
game:GetService("ReplicatedStorage"):FindFirstChild("events-@easy-
games/lobby:shared/event/lobby-
events@[Link]").joinQueue:FireServer({["queueType"] = GetQueueType()})
end)
end)
spawn(function ()

local Player = [Link]


local Character = [Link] or
[Link]:Wait()
local HumanoidRootPart =
Character:WaitForChild("HumanoidRootPart")
local Humanoid = Character:WaitForChild("Humanoid")
local TweenService = game:GetService("TweenService")
local RunService = game:GetService("RunService")

local AutoWinBoolean = false


local ChaseSpeedValue = 15

function GetRemote(Tab)
for i, v in pairs(Tab) do
if v == "Client" then
return Tab[i + 1]
end
end
return ""
end

local Bedwars = {
["ClientHandlerStore"] =
require([Link]).ClientStore
}

local IsNetworkOwner = isnetworkowner or (gethiddenproperty and


function(part)
if gethiddenproperty(part, "NetworkOwnershipRule") ==
[Link] then
return false
end
return true
end) or function() return true end

function GetMatchState()
return
Bedwars["ClientHandlerStore"]:getState().[Link]
end

function ChatMakeSystemMessage(Message)

game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage", {
Text = Message,
Font = [Link],
TextSize = 20,
Color = [Link](0, 1, 0)
})
end

function KillHumanoid(Time)
[Link](Time)
if [Link] == "✅" then

[Link]:ChangeState([Link])
[Link] = 0

game:GetService("ReplicatedStorage").rbxts_include.node_modules["@rbxts"].[Link]._
[Link]:FireServer()
end
end

function FindNearestPlayer()
local NearestPlayer
local NearestDistance = [Link]
for i, v in pairs([Link]:GetChildren()) do
if [Link] and
[Link]:FindFirstChild("HumanoidRootPart") and v ~= Player and [Link] ~=
[Link] and [Link] > 0 then
local Distance =
([Link] - [Link]).Magnitude
if Distance < NearestDistance then
NearestPlayer = v
NearestDistance = Distance
end
end
end
return NearestPlayer, NearestDistance
end

function FindNearestBed()
local NearestBed = nil
local MinDistance = [Link]
for _,v in pairs([Link]:GetDescendants()) do
if [Link]:lower() == "bed" and
v:FindFirstChild("Covers") and v:FindFirstChild("Covers").BrickColor ~=
[Link] then
local Distance = ([Link] -
[Link]).Magnitude
if Distance < MinDistance then
NearestBed = v
MinDistance = Distance
end
end
end
return NearestBed
end

function TweenToNearestPlayer(NearestPlayer)
if NearestPlayer then
local TweenTime = 0.65
local TweenInformation = [Link](TweenTime,
[Link], [Link], 0, false, 0)
local PlayerTween =
TweenService:Create([Link], TweenInformation, {CFrame =
[Link]})
if [Link] > 0 then
PlayerTween:Play()
end
end
end

function TweenToNearestPlayerSlow(NearestPlayer)
if NearestPlayer then
local TweenTime = ([Link] -
[Link]).Magnitude / 23.4 /
ChaseSpeedValue
local TweenInformation = [Link](TweenTime,
[Link], [Link], 0, false, 0)
local PlayerTween =
TweenService:Create([Link], TweenInformation, {CFrame =
[Link]})
if [Link] > 0 then
PlayerTween:Play()
end
if not [Link] then
KillHumanoid(0)
end
end
end

function TweenToNearestBed()
local NearestBed = FindNearestBed()
if NearestBed then
local TweenTime = 0.65
local TweenInformation = [Link](TweenTime,
[Link], [Link], 0, false, 0)
local BedTween =
TweenService:Create([Link], TweenInformation, {CFrame =
[Link] + [Link](0, 10, 0)})
BedTween:Play()
repeat
[Link]()
if not [Link] then
KillHumanoid(0)
end
until [Link] or [Link]
end
end

function AutoWin()
[Link]:Connect(function()
[Link](0.3)
local NearestBed = FindNearestBed()
local TeamOfBedPlayer = nil
if NearestBed and AutoWinBoolean == true and
GetMatchState() == 1 and [Link] == "✅" then
TweenToNearestBed()
local TeamColor =
NearestBed:FindFirstChild("Covers").BrickColor
for i, v in pairs([Link]:GetChildren())
do
if [Link] ~= [Link] and v ~= Player
then
if [Link] == TeamColor then
TeamOfBedPlayer = v
end
end
end

repeat
[Link]()
if not TeamOfBedPlayer then
[Link](4)
KillHumanoid(0)
end
if not
IsNetworkOwner([Link]) then
KillHumanoid(0)
end
if TeamOfBedPlayer then
if
[Link] ~= "✅" then
KillHumanoid(0)
end
end
until [Link] ~=
"✅" or [Link] <= 0
KillHumanoid(0)

else
if not FindNearestBed() and AutoWinBoolean ==
true and GetMatchState() == 1 and [Link] == "✅" then
local NearestPlayer = FindNearestPlayer()
local KillsValue =
[Link]

local Number = 0

if NearestPlayer then
TweenToNearestPlayer(NearestPlayer)
[Link](0.7)
end

if not
IsNetworkOwner([Link]) then
KillHumanoid(0)
end

repeat
if NearestPlayer and KillsValue <=
[Link] and Number < 20 then
[Link](1)

TweenToNearestPlayerSlow(NearestPlayer)
Number = Number + 1
else
if KillsValue <
[Link] then
KillHumanoid(0)
end
end
if not
IsNetworkOwner([Link]) then
KillHumanoid(0)
end
if not NearestPlayer or Number >=
20 then
KillHumanoid(0)
end
until [Link] ~=
KillsValue or [Link] <= 0 or not NearestPlayer
KillHumanoid(0)
end
end
end)
[Link]:Connect(function()
if AutoWinBoolean == true and Character and
[Link] > 0 and FindNearestBed() and GetMatchState() == 1 then
KillHumanoid(0)
[Link](0.7)
ChatMakeSystemMessage("Death tp started!")
end
end)
end

AutoWinBoolean = true
AutoWin()
local AlSploit = [Link]("ScreenGui")
local MainFrame = [Link]("Frame")
local UICorner = [Link]("UICorner")
local AutowinToggle = [Link]("TextButton")
local UICorner_2 = [Link]("UICorner")
local TweenSpeed = [Link]("TextLabel")
local UICorner_3 = [Link]("UICorner")
local TweenSpeed_2 = [Link]("TextLabel")
local UICorner_4 = [Link]("UICorner")
local Lower = [Link]("TextButton")
local UICorner_5 = [Link]("UICorner")
local Higher = [Link]("TextButton")
local UICorner_6 = [Link]("UICorner")
local TweenSpeed_3 = [Link]("TextLabel")
local UICorner_7 = [Link]("UICorner")

[Link] = false

[Link] = "AlSploit"
[Link] =
[Link]:WaitForChild("PlayerGui")
[Link] = [Link]

[Link] = "MainFrame"
[Link] = AlSploit
MainFrame.BackgroundColor3 = [Link](0, 170, 255)
[Link] = [Link](0.553374052, 0, 0.607833207, 0)
[Link] = [Link](0, 340, 0, 130)

[Link] = MainFrame

[Link] = "AutowinToggle"
[Link] = MainFrame
AutowinToggle.BackgroundColor3 = [Link](85, 255, 0)
[Link] = 0
[Link] = [Link](0.270588249, 0, 7.4505806e-09,
0)
[Link] = [Link](0, 155, 0, 25)
[Link] = [Link]
[Link] = [Link]
[Link] = "Autowin"
AutowinToggle.TextColor3 = [Link](0, 0, 0)
[Link] = true
[Link] = 14.000
[Link] = true

UICorner_2.Parent = AutowinToggle
[Link] = "TweenSpeed"
[Link] = MainFrame
TweenSpeed.BackgroundColor3 = [Link](255, 255, 255)
[Link] = 1.000
[Link] = [Link](0.235294119, 0, 0.353846163, 0)
[Link] = [Link](0, 180, 0, 21)
[Link] = [Link]
[Link] = "Player Chase Speed"
TweenSpeed.TextColor3 = [Link](0, 0, 0)
[Link] = true
[Link] = 14.000
[Link] = true

UICorner_3.Parent = TweenSpeed

TweenSpeed_2.Name = "TweenSpeed"
TweenSpeed_2.Parent = MainFrame
TweenSpeed_2.BackgroundColor3 = [Link](255, 255, 255)
TweenSpeed_2.BackgroundTransparency = 1.000
TweenSpeed_2.Position = [Link](0.235294119, 0, 0.838461518, 0)
TweenSpeed_2.Size = [Link](0, 180, 0, 21)
TweenSpeed_2.Font = [Link]
TweenSpeed_2.Text = "0"
TweenSpeed_2.TextColor3 = [Link](0, 0, 0)
TweenSpeed_2.TextScaled = true
TweenSpeed_2.TextSize = 14.000
TweenSpeed_2.TextWrapped = true

UICorner_4.Parent = TweenSpeed_2

[Link] = "Lower"
[Link] = MainFrame
Lower.BackgroundColor3 = [Link](0, 0, 0)
[Link] = 1.000
[Link] = 0
[Link] = [Link](2.98023224e-08, 0, 0.838461518, 0)
[Link] = [Link](0, 155, 0, 25)
[Link] = [Link]
[Link] = [Link]
[Link] = "<<"
Lower.TextColor3 = [Link](0, 0, 0)
[Link] = true
[Link] = 14.000
[Link] = true

UICorner_5.Parent = Lower

[Link] = "Higher"
[Link] = MainFrame
Higher.BackgroundColor3 = [Link](0, 0, 0)
[Link] = 1.000
[Link] = 0
[Link] = [Link](0.544117689, 0, 0.838461518, 0)
[Link] = [Link](0, 155, 0, 25)
[Link] = [Link]
[Link] = [Link]
[Link] = ">>"
Higher.TextColor3 = [Link](0, 0, 0)
[Link] = true
[Link] = 14.000
[Link] = true

UICorner_6.Parent = Higher

TweenSpeed_3.Name = "TweenSpeed"
TweenSpeed_3.Parent = MainFrame
TweenSpeed_3.BackgroundColor3 = [Link](255, 255, 255)
TweenSpeed_3.BackgroundTransparency = 1.000
TweenSpeed_3.Position = [Link](0.235294119, 0, 0.676923096, 0)
TweenSpeed_3.Size = [Link](0, 180, 0, 21)
TweenSpeed_3.Font = [Link]
TweenSpeed_3.Text = ""
TweenSpeed_3.TextColor3 = [Link](0, 0, 0)
TweenSpeed_3.TextScaled = true
TweenSpeed_3.TextSize = 14.000
TweenSpeed_3.TextWrapped = true
UICorner_7.Parent = TweenSpeed_3

[Link]:Connect(function()
if ChaseSpeedValue <= 14 then
ChaseSpeedValue = ChaseSpeedValue + 1
end
end)
[Link]:Connect(function()
if ChaseSpeedValue >= 2 then
ChaseSpeedValue = ChaseSpeedValue - 1
end
end)
[Link]:Connect(function()
AutoWinBoolean = not AutoWinBoolean
if AutoWinBoolean == true then
AutowinToggle.BackgroundColor3 = [Link](0, 1, 0)
[Link] = "Autowin(If turned on and off
reset character.)"
end
if AutoWinBoolean == false then
AutowinToggle.BackgroundColor3 = [Link](1, 0, 0)
[Link] = "Autowin"
end
end)
[Link]:Connect(function()
TweenSpeed_2.Text = ChaseSpeedValue
if ChaseSpeedValue == 15 then
TweenSpeed_3.Text = "(Default)"
end
if ChaseSpeedValue ~= 15 then
TweenSpeed_3.Text = ""

end
end)
end)

You might also like