Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- repeat wait() until game.Players ~= nil
- repeat wait() until game.Players.LocalPlayer ~= nil
- if game.GameId ~= 1968036988 then
- return
- end
- local Mouse = game.Players.LocalPlayer:GetMouse()
- local Casts = {
- fire = "Cast: 燃える刃!";
- lightning = "Cast: ライトニング刃!";
- dark = "Cast: 闇刃!";
- thunder = "Cast: サンダー刃!";
- inferno = "Cast: インフェルノブレード!";
- ice = "Cast: 氷の刃!";
- }
- local CastCooldowns = {
- fire = false;
- lightning = false;
- dark = false;
- thunder = false;
- inferno = false;
- ice = false;
- } -- to stop me from doing stuff twice really fast
- local function cast(str)
- game.ReplicatedStorage.DefaultChatSystemChatEvents.SayMessageRequest:FireServer(str, "To "..game.Players.LocalPlayer.Name)
- game.Players:Chat(str)
- end
- local function say(msg, target)
- if game.ReplicatedStorage:FindFirstChild("DefaultChatSystemChatEvents") then
- if game.ReplicatedStorage.DefaultChatSystemChatEvents:FindFirstChild("SayMessageRequest") then
- if target == nil then
- game.ReplicatedStorage.DefaultChatSystemChatEvents.SayMessageRequest:FireServer(msg, "All")
- game.Players:Chat(msg)
- else
- game.ReplicatedStorage.DefaultChatSystemChatEvents.SayMessageRequest:FireServer("/w "..target.." "..msg, "All")
- end
- end
- end
- end
- game.Players.LocalPlayer.Chatted:Connect(function(msg)
- if string.sub(string.gsub(string.lower(msg), "/e ", ""), 1,4) == "cast" or string.sub(string.gsub(string.lower(msg), "/e ", ""), 1,5) == ":cast" then
- local arg = string.gsub(string.lower(msg), "/e ", "")
- arg = string.gsub(string.lower(arg), ":", "")
- arg = string.gsub(string.lower(arg), "cast ", "")
- arg = string.gsub(string.lower(arg), " ", "")
- for i,v in pairs(Casts) do
- if string.sub(string.lower(i), 1, #arg) == string.lower(arg) and CastCooldowns[i] == false then
- cast(v)
- CastCooldowns[i] = true
- wait(2)
- CastCooldowns[i] = false
- end
- end
- return
- end
- if not string.find(msg, ":") and not string.find(msg, "/e ") then
- return
- end
- end)
- Mouse.KeyDown:Connect(function(key)
- if game.Players.LocalPlayer.Character == nil then
- return
- end
- if not game.Players.LocalPlayer.Character:FindFirstChild("WeaponEquipped") then
- return
- end
- if game.Players.LocalPlayer.Character.WeaponEquipped.Value == false then
- return
- end
- if key == "y" and CastCooldowns["dark"] == false then
- say(Casts["dark"])
- game.Players:Chat(Casts["dark"])
- CastCooldowns["dark"] = true
- wait(2)
- CastCooldowns["dark"] = false
- end
- if key == "j" and CastCooldowns["fire"] == false then
- say(Casts["fire"])
- game.Players:Chat(Casts["fire"])
- CastCooldowns["fire"] = true
- wait(2)
- CastCooldowns["fire"] = false
- end
- if key == "k" and CastCooldowns["inferno"] == false then
- say(Casts["inferno"])
- game.Players:Chat(Casts["inferno"])
- CastCooldowns["inferno"] = true
- wait(2)
- CastCooldowns["inferno"] = false
- end
- if key == "h" and CastCooldowns["ice"] == false then
- say(Casts["ice"])
- game.Players:Chat(Casts["ice"])
- CastCooldowns["ice"] = true
- wait(2)
- CastCooldowns["ice"] = false
- end
- if key == "b" and CastCooldowns["thunder"] == false then
- say(Casts["thunder"])
- game.Players:Chat(Casts["thunder"])
- CastCooldowns["thunder"] = true
- wait(2)
- CastCooldowns["thunder"] = false
- end
- if key == "n" and CastCooldowns["lightning"] == false then
- say(Casts["lightning"])
- game.Players:Chat(Casts["lightning"])
- CastCooldowns["lightning"] = true
- wait(2)
- CastCooldowns["lightning"] = false
- end
- end)
- --[[
- Y Key: Dark
- J Key: Fire
- K Key: Inferno
- H Key: Ice
- B Key: Thunder
- N Key: Lightning
- --]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement