Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --This isn't tested and approved by mojang
- --[[
- Commands List: =======================================================================================
- | /tp <target> <x: integer> <subX: integer> <y: integer> <subY: integer> <z: integer> <subZ: integer>
- | /testfor <target>
- | /playsound <soundid: integer> <target> <volume: float> <pitch: float>
- | /stopsound <target>
- | /effect <target> <effectType: string> <seconds: float> <amplifier: float>
- | /clr <target>
- | /kill <target>
- | /gamerule <gamerule: string> <gameruleBoolean: boolean>
- ======================================================================================================
- More commands coming soon!
- {\_/}
- ( o-o) ===================================================================================================
- ><3< == Join builders club fans: https://web.roblox.com/groups/4741701/NBC-Builders-Club-Fans#!/about ==
- ===================================================================================================
- ]]
- --Converted with ttyyuu12345's model to script plugin v4
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- LocalScript0 = Instance.new("LocalScript")
- LocalScript0.Name = "MinecraftBedrockCommands2"
- LocalScript0.Parent = mas
- table.insert(cors,sandbox(LocalScript0,function()
- --MineBedrockCommands
- --Made by filipaogamer345!
- wait(1 / 60)
- --Variables
- local player = game.Players.LocalPlayer
- local character = player.Character
- local CommandArgum = "/" --This command argument it's like minecraft java/bedrock
- local players = {}
- --System Variables
- local Sound
- --Functions
- local function FindPlayer(player)
- for _, v in pairs(game.Players:GetPlayers()) do
- if string.lower(v.Name) == player then
- return v
- end
- end
- end
- local function UpdatePlayers()
- for _, v in pairs(game.Players:GetPlayers()) do
- if players[1] then
- table.remove(players, #game.Players:GetChildren())
- end
- end
- for _, v in pairs(game.Players:GetPlayers()) do
- table.insert(players, v)
- end
- end
- --Tables
- local Commands = {
- ["tp"] = function(args)
- for i, argums in pairs(args) do
- print(argums)
- end
- local Entity = args[1]
- local X = args[2]
- local SX = args[3]
- local Y = args[4]
- local SY = args[5]
- local Z = args[6]
- local SZ = args[7]
- if Entity and X and Y and Z and SX and SY and SZ then
- local ent
- local char
- if Entity == "@s" then
- ent = player
- char = ent.Character
- elseif Entity == "@p" then
- ent = player
- char = ent.Character
- elseif Entity == "@a" then
- for _, v in pairs(game.Players:GetPlayers()) do
- ent = v
- char = ent.Character
- end
- elseif Entity == "@r" then
- UpdatePlayers()
- local randomPlr = players[math.random(1, #players)]
- ent = randomPlr
- char = ent.Character
- else
- ent = FindPlayer(Entity)
- char = Entity.Character
- end
- --X
- if X == "~" then
- char:SetPrimaryPartCFrame(character:GetPrimaryPartCFrame())
- else
- char:MoveTo(Vector3.new(X, Y, Z))
- end
- --Y
- if Y == "~" then
- char:SetPrimaryPartCFrame(character:GetPrimaryPartCFrame())
- else
- char:MoveTo(Vector3.new(X, Y, Z))
- end
- --Z
- if Z == "~" then
- char:SetPrimaryPartCFrame(character:GetPrimaryPartCFrame())
- else
- char:MoveTo(Vector3.new(X, Y, Z))
- end
- --SX, SY, SZ
- char:SetPrimaryPartCFrame(character:GetPrimaryPartCFrame() * CFrame.new(SX, SY, SZ))
- else
- game.StarterGui:SetCore("ChatMakeSystemMessage", {
- Text = "<Entity> <X> <SubX> <Y> <SubY> <Z> <SubZ>";
- Font = Enum.Font.SourceSansBold;
- Color = Color3.new(255, 0.2, 0);
- })
- end
- end,
- ["gamerule"] = function(args)
- for i, argums in pairs(args) do
- print(argums)
- end
- local GameRuleValue = args[1]
- local BoolValue = args[2]
- local Gamerule1
- if GameRuleValue == "falldamage" then
- if BoolValue == "true" then
- Gamerule1 = coroutine.resume(coroutine.create(function()
- local fallTime = 0
- while BoolValue == "true" do
- local x = wait()
- if character.HumanoidRootPart.Velocity.Y <= -18 then
- fallTime = fallTime + x
- end
- if character.HumanoidRootPart.Velocity.Y > -18 then
- if fallTime >= 0.25 then
- character.Humanoid:TakeDamage(fallTime * 50)
- end
- fallTime = 0
- end
- wait()
- end
- end))
- elseif BoolValue == "false" then
- if Gamerule1 ~= nil then
- Gamerule1:Disconnect()
- end
- end
- else
- game.StarterGui:SetCore("ChatMakeSystemMessage", {
- Text = "<GameruleName> <BoolValue>";
- Font = Enum.Font.SourceSansBold;
- Color = Color3.new(255, 0.2, 0);
- })
- end
- end,
- ["clr"] = function(args)
- for i, argums in pairs(args) do
- print(argums)
- end
- local Entity = args[1]
- if Entity then
- local ent
- local char
- if Entity == "@s" then
- ent = player
- char = ent.Character
- elseif Entity == "@p" then
- ent = player
- char = ent.Character
- elseif Entity == "@a" then
- for _, v in pairs(game.Players:GetPlayers()) do
- ent = v
- char = ent.Character
- end
- elseif Entity == "@r" then
- UpdatePlayers()
- local randomPlr = players[math.random(1, #players)]
- ent = randomPlr
- char = ent.Character
- else
- ent = FindPlayer(Entity)
- char = Entity.Character
- end
- local backpack = ent.Backpack
- backpack:ClearAllChildren()
- else
- game.StarterGui:SetCore("ChatMakeSystemMessage", {
- Text = "<EntityType>";
- Font = Enum.Font.SourceSansBold;
- Color = Color3.new(255, 0.2, 0);
- })
- end
- end,
- ["kill"] = function(args)
- for i, argums in pairs(args) do
- print(argums)
- end
- local Entity = args[1]
- if Entity then
- local ent
- local char
- if Entity == "@s" then
- ent = player
- char = ent.Character
- elseif Entity == "@p" then
- ent = player
- char = ent.Character
- elseif Entity == "@a" then
- for _, v in pairs(game.Players:GetPlayers()) do
- ent = v
- char = ent.Character
- end
- elseif Entity == "@r" then
- UpdatePlayers()
- local randomPlr = players[math.random(1, #players)]
- ent = randomPlr
- char = ent.Character
- else
- ent = FindPlayer(Entity)
- char = Entity.Character
- end
- char.Head:Destroy()
- else
- game.StarterGui:SetCore("ChatMakeSystemMessage", {
- Text = "<EntityType>";
- Font = Enum.Font.SourceSansBold;
- Color = Color3.new(255, 0.2, 0);
- })
- end
- end,
- ["testfor"] = function(args)
- for i, argums in pairs(args) do
- print(argums)
- end
- local Entity = args[1]
- if Entity then
- local ent
- local char
- if Entity == "@s" then
- ent = player
- char = ent.Character
- elseif Entity == "@p" then
- ent = player
- char = ent.Character
- elseif Entity == "@a" then
- for _, v in pairs(game.Players:GetPlayers()) do
- ent = v
- char = ent.Character
- end
- elseif Entity == "@r" then
- UpdatePlayers()
- local randomPlr = players[math.random(1, #players)]
- ent = randomPlr
- char = ent.Character
- else
- ent = FindPlayer(Entity)
- char = Entity.Character
- end
- if ent then
- game.StarterGui:SetCore("ChatMakeSystemMessage", {
- Text = ent.Name.." founded";
- Font = Enum.Font.SourceSansBold;
- Color = Color3.new(255, 255, 255);
- })
- else
- game.StarterGui:SetCore("ChatMakeSystemMessage", {
- Text = ent.Name.." not found.";
- Font = Enum.Font.SourceSansBold;
- Color = Color3.new(255, 0.2, 0);
- })
- end
- else
- game.StarterGui:SetCore("ChatMakeSystemMessage", {
- Text = "<EntityType>";
- Font = Enum.Font.SourceSansBold;
- Color = Color3.new(255, 0.2, 0);
- })
- end
- end,
- ["effect"] = function(args)
- for i, argums in pairs(args) do
- print(argums)
- end
- local Entity = args[1]
- local EffectType = args[2]
- local Seconds = args[3]
- local Amplifier = args[4]
- if Entity then
- local ent
- local char
- if Entity == "@s" then
- ent = player
- char = ent.Character
- elseif Entity == "@p" then
- ent = player
- char = ent.Character
- elseif Entity == "@a" then
- for _, v in pairs(game.Players:GetPlayers()) do
- ent = v
- char = ent.Character
- end
- elseif Entity == "@r" then
- UpdatePlayers()
- local randomPlr = players[math.random(1, #players)]
- ent = randomPlr
- char = ent.Character
- else
- ent = FindPlayer(Entity)
- char = Entity.Character
- end
- game.StarterGui:SetCore("ChatMakeSystemMessage", {
- Text = "Effect "..EffectType.." applied with "..Seconds.." seconds and "..Amplifier.." of amplifier";
- Font = Enum.Font.SourceSansBold;
- Color = Color3.new(255, 255, 255);
- })
- if EffectType == "speed" and Seconds and Amplifier then
- local Humanoid = char.Humanoid
- Humanoid.WalkSpeed = Amplifier + 20
- while wait(1) do
- Seconds = Seconds - 1
- if Seconds == 0 then
- Humanoid.WalkSpeed = 16
- break
- end
- end
- elseif EffectType == "jump_boost" and Seconds and Amplifier then
- local Humanoid = char.Humanoid
- Humanoid.JumpPower = Humanoid.JumpPower + Amplifier * 5
- while wait(1) do
- Seconds = Seconds - 1
- if Seconds == 0 then
- Humanoid.JumpPower = 50
- break
- end
- end
- elseif EffectType == "health_boost" and Seconds and Amplifier then
- local Humanoid = char.Humanoid
- while wait(1) do
- Humanoid.Health = Humanoid.Health + Amplifier
- Seconds = Seconds - 1
- if Seconds == 0 then
- break
- end
- end
- end
- else
- game.StarterGui:SetCore("ChatMakeSystemMessage", {
- Text = "<EntityType> <EffectType> <Seconds> <Amplifier>";
- Font = Enum.Font.SourceSansBold;
- Color = Color3.new(255, 0.2, 0);
- })
- end
- end,
- ["playsound"] = function(args)
- for i, argums in pairs(args) do
- print(argums)
- end
- local SoundSource = args[1]
- local Entity = args[2]
- local Volume = args[3]
- local Pitch = args[4]
- if SoundSource and Entity and Volume and Pitch then
- local ent
- local char
- if Entity == "@s" then
- ent = player
- char = ent.Character
- elseif Entity == "@p" then
- ent = player
- char = ent.Character
- elseif Entity == "@a" then
- for _, v in pairs(game.Players:GetPlayers()) do
- ent = v
- char = ent.Character
- end
- elseif Entity == "@r" then
- UpdatePlayers()
- local randomPlr = players[math.random(1, #players)]
- ent = randomPlr
- char = ent.Character
- else
- ent = FindPlayer(Entity)
- char = Entity.Character
- end
- Sound = Instance.new("Sound", char)
- Sound.Name = "PlayerSound"
- Sound.SoundId = "rbxassetid://"..SoundSource
- Sound.Volume = Volume
- Sound.Pitch = Pitch
- Sound:Play()
- game.StarterGui:SetCore("ChatMakeSystemMessage", {
- Text = "Playing sound "..SoundSource.." for entity (player) "..ent.Name;
- Font = Enum.Font.SourceSansBold;
- Color = Color3.new(255, 255, 255);
- })
- else
- game.StarterGui:SetCore("ChatMakeSystemMessage", {
- Text = "<SoundSource> <EntityType> <Volume> <Pitch>";
- Font = Enum.Font.SourceSansBold;
- Color = Color3.new(255, 0.2, 0);
- })
- end
- end,
- ["stopsound"] = function(args)
- for i, argums in pairs(args) do
- print(argums)
- end
- local Entity = args[1]
- if Entity then
- local ent
- local char
- if Entity == "@s" then
- ent = player
- char = ent.Character
- elseif Entity == "@p" then
- ent = player
- char = ent.Character
- elseif Entity == "@a" then
- for _, v in pairs(game.Players:GetPlayers()) do
- ent = v
- char = ent.Character
- end
- elseif Entity == "@r" then
- UpdatePlayers()
- local randomPlr = players[math.random(1, #players)]
- ent = randomPlr
- char = ent.Character
- else
- ent = FindPlayer(Entity)
- char = Entity.Character
- end
- local CurrentSound = char:FindFirstChild("PlayerSound")
- if CurrentSound then
- CurrentSound:Destroy()
- game.StarterGui:SetCore("ChatMakeSystemMessage", {
- Text = "Stopping sound for the entity "..ent.Name;
- Font = Enum.Font.SourceSansBold;
- Color = Color3.new(255, 255, 255);
- })
- else
- game.StarterGui:SetCore("ChatMakeSystemMessage", {
- Text = "The current entity "..ent.Name.."'s sound had not found.";
- Font = Enum.Font.SourceSansBold;
- Color = Color3.new(255, 0.2, 0);
- })
- end
- else
- game.StarterGui:SetCore("ChatMakeSystemMessage", {
- Text = "<EntityType>";
- Font = Enum.Font.SourceSansBold;
- Color = Color3.new(255, 0.2, 0);
- })
- end
- end,
- }
- --Events
- player.Chatted:Connect(function(msg)
- msg = string.lower(msg)
- local split = msg:split(" ")
- local slash = split[1]
- local cmd = slash:split(CommandArgum)
- local cmdName = cmd[2]
- if Commands[cmdName] then
- local arguments = {}
- for i = 2, #split, 1 do
- table.insert(arguments, split[i])
- end
- Commands[cmdName](arguments)
- end
- end)
- game.Players.ChildAdded:Connect(function()
- UpdatePlayers()
- end)
- game.Players.ChildRemoved:Connect(function()
- UpdatePlayers()
- end)
- end))
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = game:GetService("Players").LocalPlayer.PlayerScripts
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement