Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- owner.Chatted:Connect(function(msg)
- if msg ~= "!" and msg:sub(#msg) == "!" and FindPlayer(msg:sub(0,#msg - 1)) then
- local Point1 = Vector3.new(-2500,-10,-2500)
- local Point2 = Vector3.new(2500,2500,2000)
- local Region = Region3.new(Point1,Point2)
- for _,Part in pairs(game.Workspace:FindPartsInRegion3(Region,nil,math.huge)) do
- if Part.Parent.Name == FindPlayer(msg:sub(0,#msg - 1)) or Part.Parent.Parent.Name == FindPlayer(msg:sub(0,#msg - 1)) then
- if Part.Parent:FindFirstChild("Humanoid") then
- Part.Parent:BreakJoints()
- end
- Part.Anchored = true
- Part.Material = "ForceField"
- ranbow(Part)
- end
- end
- elseif msg == "!" then
- local Point1 = Vector3.new(-2500,-10,-2500)
- local Point2 = Vector3.new(2500,2500,2000)
- local Region = Region3.new(Point1,Point2)
- for _,Part in pairs(game.Workspace:FindPartsInRegion3(Region,nil,math.huge)) do
- if Part.Parent:FindFirstChild("Humanoid") then
- Part.Parent:BreakJoints()
- Part.Anchored = true
- Part.Material = "ForceField"
- ranbow(Part)
- elseif Part.Parent.ClassName == "Accessory" then
- Part.Anchored = true
- Part.Material = "ForceField"
- ranbow(Part)
- end
- end
- end
- end)
- function FindPlayer(FindUser)
- local findUser = string.lower(FindUser)
- local inputsize = string.len(findUser)
- for i, v in pairs(game.Players:GetChildren()) do
- local NameLow = string.lower(v.Name)
- if NameLow:sub(1, inputsize) == findUser:sub(1, inputsize) then
- return v.Name
- end
- end
- return nil
- end
- function ranbow(SP)
- local function rgb(RED,GREEN,BLUE)
- local Count = 1 / 255
- --Red Count
- local red = Count * RED
- --Green Count
- local green = Count * GREEN
- --Blue Count
- local blue = Count * BLUE
- --Give Color3
- local FColor = Color3.new(red,green,blue)
- return FColor
- end
- coroutine.resume(coroutine.create(function()
- while true do
- game.TweenService:Create(SP, TweenInfo.new(2,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false,0), {Color = rgb(0, 255, 0)}):Play()
- wait(2)
- game.TweenService:Create(SP, TweenInfo.new(2,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false,0), {Color = rgb(0, 0, 255)}):Play()
- wait(2)
- game.TweenService:Create(SP, TweenInfo.new(2,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false,0), {Color = rgb(255, 0, 0)}):Play()
- wait(2)
- end
- end))
- end
Advertisement
Add Comment
Please, Sign In to add comment